Skip to content

Commit

Permalink
sunxi: Use mmc_bootdev=2 for MMC2 boot
Browse files Browse the repository at this point in the history
With DM_MMC the mmc devices are probed as per dt status
and eMMC can probed maximum device of 2, if all nodes like
mmc0, mmc1 and mmc2 status are 'okay'.

So update mmc_bootdev to 2 and add boot order as 2, 1, 0
devices. so-that it can to boot any identified device even
if the respective device status disabled or unsupported.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
  • Loading branch information
openedev committed Jul 16, 2018
1 parent 9ac50ab commit 3f0e880
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion board/sunxi/board.c
Expand Up @@ -768,7 +768,7 @@ int misc_init_r(void)
} else if (boot == BOOT_DEVICE_MMC1) {
env_set("mmc_bootdev", "0");
} else if (boot == BOOT_DEVICE_MMC2) {
env_set("mmc_bootdev", "1");
env_set("mmc_bootdev", "2");
}

setup_environment(gd->fdt_blob);
Expand Down
4 changes: 3 additions & 1 deletion include/configs/sunxi-common.h
Expand Up @@ -373,8 +373,10 @@ extern int soft_i2c_gpio_scl;
#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) \
"bootcmd_mmc_auto=" \
"if test ${mmc_bootdev} -eq 1; then " \
"if test ${mmc_bootdev} -eq 2; then " \
"run bootcmd_mmc2; " \
"run bootcmd_mmc1; " \
"run bootcmd_mmc0; " \
"elif test ${mmc_bootdev} -eq 0; then " \
Expand Down

0 comments on commit 3f0e880

Please sign in to comment.