]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
i.MX6Q: isiot: Switch the mmc env based on devno
authorJagan Teki <jagan@amarulasolutions.com>
Fri, 24 Feb 2017 10:15:26 +0000 (15:45 +0530)
committerStefano Babic <sbabic@denx.de>
Fri, 17 Mar 2017 08:27:08 +0000 (09:27 +0100)
Add board_mmc_get_env_dev

Switch the mmc env based on the mmc devno, instead of separately
defining a config item in include/configs using board_mmc_get_env_dev
- devno 0: sd/esd
- devno 1: mmc/emmc

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
board/engicam/icorem6_rqs/icorem6_rqs.c

index 04fb0c2028b7d67b9f6e3af34ce5c45e9bb927c5..01380f1269796fd876b5bf392742e25b6be86b93 100644 (file)
@@ -47,6 +47,12 @@ int board_init(void)
 }
 
 #ifdef CONFIG_ENV_IS_IN_MMC
+int board_mmc_get_env_dev(int devno)
+{
+       /* dev 0 for SD/eSD, dev 1 for MMC/eMMC */
+       return (devno == 3) ? 1 : 0;
+}
+
 static void mmc_late_init(void)
 {
        char cmd[32];