From: Peng Fan Date: Mon, 28 Jan 2019 09:40:08 +0000 Subject: [U-Boot] [PATCH 16/20] imx8m: fix sd to mmc1 and emmc to mmc2 for i.MX8MM In-Reply-To: <20190128094807.26532-1-peng.fan@nxp.com> References: <20190128094807.26532-1-peng.fan@nxp.com> Message-ID: <20190128094807.26532-17-peng.fan@nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: Peng Fan --- arch/arm/mach-imx/spl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index ebd8ff9290..0048832be8 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -147,9 +147,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 #endif case NAND_BOOT: return BOOT_DEVICE_NAND; -- 2.14.1