imx: mmc_env: update runtime SD/MMC boot env device
authorPeng Fan <peng.fan@nxp.com>
Tue, 27 Aug 2019 06:25:54 +0000 (06:25 +0000)
committerStefano Babic <sbabic@denx.de>
Tue, 8 Oct 2019 14:36:36 +0000 (16:36 +0200)
When DM_MMC enabled, the USDHC index in U-Boot is the USDHC port.
To directly return devno, we could avoid add board specific code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/mmc_env.c

index 9c822f7..addb50f 100644 (file)
@@ -11,6 +11,9 @@
 
 __weak int board_mmc_get_env_dev(int devno)
 {
+       if (CONFIG_IS_ENABLED(DM_MMC))
+               return devno;
+
        return CONFIG_SYS_MMC_ENV_DEV;
 }