diff options
author | Tom Rini <trini@konsulko.com> | 2017-10-12 13:36:37 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-10-12 13:36:37 -0400 |
commit | e11d2fff73b5c0e04027b55020a0a56d9dc72aa4 (patch) | |
tree | 506fe0f032e17fbe0854de7a64478b66e10a5379 /arch/arm/mach-imx/spl.c | |
parent | 1b22c5ba496ffc9b0702919d58c410ed1527ab63 (diff) | |
parent | 0a333602df9fd9dcd6f58c8c098b29a3bd1dffcc (diff) |
Merge git://www.denx.de/git/u-boot-imx
Diffstat (limited to 'arch/arm/mach-imx/spl.c')
-rw-r--r-- | arch/arm/mach-imx/spl.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index fb94c969ecc..d0d1b73aa63 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -14,6 +14,7 @@ #include <asm/spl.h> #include <spl.h> #include <asm/mach-imx/hab.h> +#include <asm/mach-imx/boot_mode.h> #include <g_dnl.h> DECLARE_GLOBAL_DATA_PTR; @@ -96,6 +97,27 @@ u32 spl_boot_device(void) return BOOT_DEVICE_NONE; } +#elif defined(CONFIG_MX7) +/* Translate iMX7 boot device to the SPL boot device enumeration */ +u32 spl_boot_device(void) +{ + enum boot_device boot_device_spl = get_boot_device(); + + switch (boot_device_spl) { + case SD1_BOOT: + case MMC1_BOOT: + return BOOT_DEVICE_MMC1; + case SD2_BOOT: + case MMC2_BOOT: + return BOOT_DEVICE_MMC2; + case SPI_NOR_BOOT: + return BOOT_DEVICE_SPI; + default: + return BOOT_DEVICE_NONE; + } +} +#endif /* CONFIG_MX6 || CONFIG_MX7 */ + #ifdef CONFIG_SPL_USB_GADGET_SUPPORT int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) { @@ -104,7 +126,6 @@ int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) return 0; } #endif -#endif #if defined(CONFIG_SPL_MMC_SUPPORT) /* called from spl_mmc to see type of boot mode for storage (RAW or FAT) */ |