[U-Boot] [PATCH v3 15/15] i.MX6Q: isiot: Switch the mmc env based on devno
Jagan Teki
jagan at openedev.com
Thu Feb 2 14:56:13 UTC 2017
From: Jagan Teki <jagan at amarulasolutions.com>
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 at denx.de>
Cc: Matteo Lisi <matteo.lisi at engicam.com>
Cc: Michael Trimarchi <michael at amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
---
board/engicam/icorem6_rqs/icorem6_rqs.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/board/engicam/icorem6_rqs/icorem6_rqs.c b/board/engicam/icorem6_rqs/icorem6_rqs.c
index f289e91..d2f9309 100644
--- a/board/engicam/icorem6_rqs/icorem6_rqs.c
+++ b/board/engicam/icorem6_rqs/icorem6_rqs.c
@@ -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];
--
1.9.1
More information about the U-Boot
mailing list