diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 5ed1b8bae18..7edc4681856 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -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); diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 21371f4919f..abf10f6dcf9 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -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 " \