[U-Boot] [PATCH v2 4/5] ARM: at91: spl: Add macro CONFIG_XXXX_BOOT support
Wenyou Yang
wenyou.yang at microchip.com
Wed Sep 6 09:47:54 UTC 2017
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 at microchip.com>
---
Changes in v2: None
arch/arm/mach-at91/spl.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-at91/spl.c b/arch/arm/mach-at91/spl.c
index e113336b7b..c2e2d90a89 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
@@ -71,11 +73,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;
@@ -85,7 +89,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;
--
2.13.0
More information about the U-Boot
mailing list