[U-Boot] [PATCH v3 31/58] sunxi: Add mmc 2, 3 bootenv devices

Jagan Teki jagan at amarulasolutions.com
Sun Aug 19 13:56:48 UTC 2018


By enabling DM_MMC, the mmc devices are probed as per
DT status not with respect to MMC_SUNXI_SLOT_EXTRA in
U-Boot proper and eMMC can probed maximum device of 3,
if all nodes mmc0, mmc1, mmc2 and mmc3 status's are 'okay'

This patch create bootcmd env for mmc2, mmc3 and start boot
priority with mmc3...mmc0

Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
---
 include/configs/sunxi-common.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index f1578d3754..176ee06036 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -373,12 +373,15 @@ extern int soft_i2c_gpio_scl;
 	"ramdisk ram " RAMDISK_ADDR_R " 0x4000000\0"
 
 #ifdef CONFIG_MMC
-#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
 #define BOOTENV_DEV_MMC_AUTO(devtypeu, devtypel, instance)		\
 	BOOTENV_DEV_MMC(MMC, mmc, 0)					\
 	BOOTENV_DEV_MMC(MMC, mmc, 1)					\
+	BOOTENV_DEV_MMC(MMC, mmc, 2)					\
+	BOOTENV_DEV_MMC(MMC, mmc, 3)					\
 	"bootcmd_mmc_auto="						\
 		"if test ${mmc_bootdev} -eq 1; then "			\
+			"run bootcmd_mmc3; "				\
+			"run bootcmd_mmc2; "				\
 			"run bootcmd_mmc1; "				\
 			"run bootcmd_mmc0; "				\
 		"elif test ${mmc_bootdev} -eq 0; then "			\
@@ -391,9 +394,6 @@ extern int soft_i2c_gpio_scl;
 
 #define BOOT_TARGET_DEVICES_MMC(func) func(MMC_AUTO, mmc_auto, na)
 #else
-#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0)
-#endif
-#else
 #define BOOT_TARGET_DEVICES_MMC(func)
 #endif
 
-- 
2.18.0.321.gffc6fa0e3



More information about the U-Boot mailing list