]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
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 9c822f721c600c1733e23fb6f6f59f7c84f0220f..addb50f5382aa31b968ba3285eed1d385de61a99 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;
 }