diff options
author | Wenyou Yang <wenyou.yang@microchip.com> | 2017-09-14 11:07:43 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-09-14 16:02:47 -0400 |
commit | a35c34025e4ae08441f2e26ddcac86aec63c33af (patch) | |
tree | e69d8e4b5f4c51ebe8780c5283db887109bae3f9 | |
parent | e61ed48ff5d530e3c8adf435c57cde9936295f5e (diff) |
ARM: at91: spl: Add macro CONFIG_XXXX_BOOT support
Use the CONFIG_XXXX_BOOT to indicate the boot media, instead of
the CONFIG_SYS_USE_XXXX option, which is declared by
CONFIG_SYS_EXTRA_OPTIONS option.
Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
-rw-r--r-- | arch/arm/mach-at91/spl.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/arm/mach-at91/spl.c b/arch/arm/mach-at91/spl.c index 98337aebbe1..7e7e24bbe69 100644 --- a/arch/arm/mach-at91/spl.c +++ b/arch/arm/mach-at91/spl.c @@ -37,7 +37,7 @@ u32 spl_boot_device(void) u32 off = (bootrom_stash.r4 >> ATMEL_SAMA5_BOOT_DEV_ID_OFF) & ATMEL_SAMA5_BOOT_DEV_ID_MASK; -#if defined(CONFIG_SYS_USE_MMC) +#if defined(CONFIG_SYS_USE_MMC) || defined(CONFIG_SD_BOOT) if (dev == ATMEL_SAMA5_BOOT_FROM_MCI) { #if defined(CONFIG_SPL_OF_CONTROL) return BOOT_DEVICE_MMC1; @@ -52,7 +52,9 @@ u32 spl_boot_device(void) } #endif -#if defined(CONFIG_SYS_USE_SERIALFLASH) || defined(CONFIG_SYS_USE_SPIFLASH) +#if defined(CONFIG_SYS_USE_SERIALFLASH) || \ + defined(CONFIG_SYS_USE_SPIFLASH) || \ + defined(CONFIG_SPI_BOOT) if (dev == ATMEL_SAMA5_BOOT_FROM_SPI) return BOOT_DEVICE_SPI; #endif @@ -73,11 +75,13 @@ u32 spl_boot_device(void) #else u32 spl_boot_device(void) { -#ifdef CONFIG_SYS_USE_MMC +#if defined(CONFIG_SYS_USE_MMC) || defined(CONFIG_SD_BOOT) return BOOT_DEVICE_MMC1; -#elif CONFIG_SYS_USE_NANDFLASH +#elif defined(CONFIG_SYS_USE_NANDFLASH) || defined(CONFIG_NAND_BOOT) return BOOT_DEVICE_NAND; -#elif CONFIG_SYS_USE_SERIALFLASH || CONFIG_SYS_USE_SPIFLASH +#elif defined(CONFIG_SYS_USE_SERIALFLASH) || \ + defined(CONFIG_SYS_USE_SPIFLASH) || \ + defined(CONFIG_SPI_BOOT) return BOOT_DEVICE_SPI; #endif return BOOT_DEVICE_NONE; @@ -87,7 +91,7 @@ u32 spl_boot_device(void) u32 spl_boot_mode(const u32 boot_device) { switch (boot_device) { -#ifdef CONFIG_SYS_USE_MMC +#if defined(CONFIG_SYS_USE_MMC) || defined(CONFIG_SD_BOOT) case BOOT_DEVICE_MMC1: case BOOT_DEVICE_MMC2: return MMCSD_MODE_FS; |