Commit 6c6206ad1a5a3c70118a3ecf526b0ff00088adf7
1 parent
54a97f3180
Exists in
smarc_8mm-imx_v2018.03_4.14.98_2.0.0_ga
and in
5 other branches
MLK-18243-17: arm: mach-imx: 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: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 3e4123fb3d6945a466563f4505a56bb0ea6f4ca0)
Showing 1 changed file with 11 additions and 0 deletions Side-by-side Diff
arch/arm/mach-imx/spl.c
| ... | ... | @@ -116,10 +116,19 @@ |
| 116 | 116 | case SD1_BOOT: |
| 117 | 117 | case MMC1_BOOT: |
| 118 | 118 | return BOOT_DEVICE_MMC1; |
| 119 | +#if defined(CONFIG_IMX8MM) | |
| 119 | 120 | case SD2_BOOT: |
| 120 | 121 | case MMC2_BOOT: |
| 122 | + return BOOT_DEVICE_MMC1; | |
| 123 | + case SD3_BOOT: | |
| 124 | + case MMC3_BOOT: | |
| 121 | 125 | return BOOT_DEVICE_MMC2; |
| 126 | +#else | |
| 127 | + case SD2_BOOT: | |
| 128 | + case MMC2_BOOT: | |
| 129 | + return BOOT_DEVICE_MMC2; | |
| 122 | 130 | #endif |
| 131 | +#endif | |
| 123 | 132 | case NAND_BOOT: |
| 124 | 133 | return BOOT_DEVICE_NAND; |
| 125 | 134 | case SPI_NOR_BOOT: |
| ... | ... | @@ -150,6 +159,7 @@ |
| 150 | 159 | /* for MMC return either RAW or FAT mode */ |
| 151 | 160 | case SD1_BOOT: |
| 152 | 161 | case SD2_BOOT: |
| 162 | + case SD3_BOOT: | |
| 153 | 163 | #if defined(CONFIG_SPL_FAT_SUPPORT) |
| 154 | 164 | return MMCSD_MODE_FS; |
| 155 | 165 | #else |
| ... | ... | @@ -158,6 +168,7 @@ |
| 158 | 168 | break; |
| 159 | 169 | case MMC1_BOOT: |
| 160 | 170 | case MMC2_BOOT: |
| 171 | + case MMC3_BOOT: | |
| 161 | 172 | #if defined(CONFIG_SPL_FAT_SUPPORT) |
| 162 | 173 | return MMCSD_MODE_FS; |
| 163 | 174 | #elif defined(CONFIG_SUPPORT_EMMC_BOOT) |