From: Peng Fan Date: Fri, 21 Dec 2018 06:21:23 +0000 (+0000) Subject: spl: imx8: add spl boot device X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=f541796af929fa28a78dc3162a0ba09d4fa3ce90;p=u-boot.git spl: imx8: add spl boot device Add spl_boot_device for i.MX8, also add BOOT_DEVICE_MMC2_2 for spl_boot_mode. Signed-off-by: Peng Fan --- diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index 397d6d4a91..ebd8ff9290 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -96,7 +96,7 @@ u32 spl_boot_device(void) return BOOT_DEVICE_NONE; } -#elif defined(CONFIG_MX7) || defined(CONFIG_IMX8M) +#elif defined(CONFIG_MX7) || defined(CONFIG_IMX8M) || defined(CONFIG_IMX8) /* Translate iMX7/i.MX8M boot device to the SPL boot device enumeration */ u32 spl_boot_device(void) { @@ -134,6 +134,15 @@ u32 spl_boot_device(void) case SD3_BOOT: case MMC3_BOOT: return BOOT_DEVICE_MMC1; +#elif defined(CONFIG_IMX8) + case MMC1_BOOT: + return BOOT_DEVICE_MMC1; + case SD2_BOOT: + return BOOT_DEVICE_MMC2_2; + case SD3_BOOT: + return BOOT_DEVICE_MMC1; + case FLEXSPI_BOOT: + return BOOT_DEVICE_SPI; #elif defined(CONFIG_IMX8M) case SD1_BOOT: case MMC1_BOOT: @@ -152,7 +161,7 @@ u32 spl_boot_device(void) return BOOT_DEVICE_NONE; } } -#endif /* CONFIG_MX7 || CONFIG_IMX8M */ +#endif /* CONFIG_MX7 || CONFIG_IMX8M || CONFIG_IMX8 */ #ifdef CONFIG_SPL_USB_GADGET int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) @@ -171,6 +180,7 @@ u32 spl_boot_mode(const u32 boot_device) /* for MMC return either RAW or FAT mode */ case BOOT_DEVICE_MMC1: case BOOT_DEVICE_MMC2: + case BOOT_DEVICE_MMC2_2: #if defined(CONFIG_SPL_FAT_SUPPORT) return MMCSD_MODE_FS; #elif defined(CONFIG_SUPPORT_EMMC_BOOT)