summaryrefslogtreecommitdiff
path: root/drivers/gpio/imx_rgpio2p.c
diff options
context:
space:
mode:
authorBen Wolsieffer <benwolsieffer@gmail.com>2024-03-07 22:00:51 -0500
committerKever Yang <kever.yang@rock-chips.com>2024-03-14 18:19:28 +0800
commit3b95c03d5706255f39a8f1a0fa02045d4fd981df (patch)
treeea1356fbb274faa6163040782496368eb9d627b6 /drivers/gpio/imx_rgpio2p.c
parent41a60d0e5cef54a59596a58940fa7c9cf071034b (diff)
rockchip: load env from boot MMC device
Currently, if the environment is stored on an MMC device, the device number is hardcoded by CONFIG_SYS_MMC_ENV_DEV. This is problematic because many boards can choose between booting from an SD card or a removable eMMC. For example, the Rock64 defconfig sets CONFIG_SYS_MMC_ENV_DEV=1, which corresponds to the SD card. If an eMMC is used as the boot device and no SD card is installed, it is impossible to save the environment. To avoid this problem, we can choose the environment MMC device based on the boot device. The theobroma-systems boards already contain code to do this, so this commit simply moves it to the common Rockchip board file, with some refactoring. I also removed another implementation of mmc_get_env_dev() from tinker_rk3288 that performed MMC boot device detection by reading a bootrom register. This has been tested on a Rock64v2. Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com> Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Diffstat (limited to 'drivers/gpio/imx_rgpio2p.c')
0 files changed, 0 insertions, 0 deletions