Commit 3e4123fb authored by Ye Li's avatar Ye Li Committed by Peng Fan

MLK-18243-17: arm: imx-common: fix sd to mmc1 and emmc to mmc2 for i.MX8MM

Since the SD is usdhc2 and eMMC is usdhc3, this cause mapping problem
for spl_boot_device. So far hard coded them to correct MMC index, so
that SD and eMMC boot can work.
Signed-off-by: 's avatarYe Li <ye.li@nxp.com>
Signed-off-by: 's avatarPeng Fan <peng.fan@nxp.com>
parent 0e7a5484
......@@ -102,9 +102,18 @@ u32 spl_boot_device(void)
case SD1_BOOT:
case MMC1_BOOT:
return BOOT_DEVICE_MMC1;
#if defined(CONFIG_IMX8MM)
case SD2_BOOT:
case MMC2_BOOT:
return BOOT_DEVICE_MMC1;
case SD3_BOOT:
case MMC3_BOOT:
return BOOT_DEVICE_MMC2;
#else
case SD2_BOOT:
case MMC2_BOOT:
return BOOT_DEVICE_MMC2;
#endif
case NAND_BOOT:
return BOOT_DEVICE_NAND;
case USB_BOOT:
......@@ -124,6 +133,7 @@ u32 spl_boot_mode(const u32 boot_device)
/* for MMC return either RAW or FAT mode */
case SD1_BOOT:
case SD2_BOOT:
case SD3_BOOT:
#if defined(CONFIG_SPL_FAT_SUPPORT)
return MMCSD_MODE_FS;
#else
......@@ -133,6 +143,7 @@ u32 spl_boot_mode(const u32 boot_device)
case MMC1_BOOT:
case MMC2_BOOT:
case MMC3_BOOT:
#if defined(CONFIG_SPL_FAT_SUPPORT)
return MMCSD_MODE_FS;
#elif defined(CONFIG_SUPPORT_EMMC_BOOT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment