[U-Boot] [PATCH 3/6] mvebu: consolidate SPL boot device config symbols

Baruch Siach baruch at tkos.co.il
Mon Jun 18 18:56:24 UTC 2018


Use MVEBU_SPL_BOOT_DEVICE_* to select between SPI and MMC, instead of
board specific symbols. This commit enables the boot device selection
menu to all mvebu platforms, but it is only effective on Turris Omnia
and gdsys Controlcenter DC platforms. A following commit will enable
boot selection for other platforms.

Signed-off-by: Baruch Siach <baruch at tkos.co.il>
---
 arch/arm/Kconfig               |  1 -
 arch/arm/mach-mvebu/Kconfig    | 11 ++++-------
 board/gdsys/a38x/Kconfig       | 24 ------------------------
 board/gdsys/a38x/Makefile      |  4 ++--
 include/configs/turris_omnia.h |  4 ++--
 5 files changed, 8 insertions(+), 36 deletions(-)
 delete mode 100644 board/gdsys/a38x/Kconfig

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 22234cde2ab6..226ac9979207 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1419,7 +1419,6 @@ source "board/freescale/ls1012ardb/Kconfig"
 source "board/freescale/ls1012afrdm/Kconfig"
 source "board/freescale/mx35pdk/Kconfig"
 source "board/freescale/s32v234evb/Kconfig"
-source "board/gdsys/a38x/Kconfig"
 source "board/grinn/chiliboard/Kconfig"
 source "board/gumstix/pepper/Kconfig"
 source "board/h2200/Kconfig"
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 9226511f7f91..2ee01e9cff81 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -183,21 +183,18 @@ config SYS_VENDOR
 config SYS_SOC
 	default "mvebu"
 
-if TARGET_TURRIS_OMNIA
-
 choice
-	prompt "Turris Omnia boot method"
+	prompt "Boot method"
 
-config TURRIS_OMNIA_SPL_BOOT_DEVICE_SPI
+config MVEBU_SPL_BOOT_DEVICE_SPI
 	bool "SPI NOR flash"
 
-config TURRIS_OMNIA_SPL_BOOT_DEVICE_MMC
+config MVEBU_SPL_BOOT_DEVICE_MMC
 	bool "SDIO/MMC card"
+	select SPL_LIBDISK_SUPPORT
 
 endchoice
 
-endif
-
 config MVEBU_EFUSE
 	bool "Enable eFuse support"
 	default n
diff --git a/board/gdsys/a38x/Kconfig b/board/gdsys/a38x/Kconfig
deleted file mode 100644
index ff11eb2371e8..000000000000
--- a/board/gdsys/a38x/Kconfig
+++ /dev/null
@@ -1,24 +0,0 @@
-if TARGET_CONTROLCENTERDC
-
-menu "Controlcenter DC board options"
-
-choice
-	prompt "Select boot method"
-
-config SPL_BOOT_DEVICE_SPI
-	bool "SPI"
-
-config SPL_BOOT_DEVICE_MMC
-	bool "MMC"
-	select SPL_LIBDISK_SUPPORT
-
-endchoice
-
-#config SPL_BOOT_DEVICE
-#	int
-#	default 1 if SPL_BOOT_DEVICE_SPI
-#	default 2 if SPL_BOOT_DEVICE_MMC
-
-endmenu
-
-endif
diff --git a/board/gdsys/a38x/Makefile b/board/gdsys/a38x/Makefile
index 43fec2edbb29..18ecbe5e7979 100644
--- a/board/gdsys/a38x/Makefile
+++ b/board/gdsys/a38x/Makefile
@@ -13,10 +13,10 @@ obj-$(CONFIG_TARGET_CONTROLCENTERDC) += hydra.o ihs_phys.o
 extra-$(CONFIG_TARGET_CONTROLCENTERDC) += kwbimage.cfg
 
 KWB_REPLACE += BOOT_FROM
-ifneq ($(CONFIG_SPL_BOOT_DEVICE_SPI),)
+ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),)
 	KWB_CFG_BOOT_FROM=spi
 endif
-ifneq ($(CONFIG_SPL_BOOT_DEVICE_MMC),)
+ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),)
 	KWB_CFG_BOOT_FROM=sdio
 endif
 
diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h
index 9d4d0dfbb29f..44d5016fbf6f 100644
--- a/include/configs/turris_omnia.h
+++ b/include/configs/turris_omnia.h
@@ -93,13 +93,13 @@
 #define CONFIG_SPL_BOOTROM_SAVE		(CONFIG_SPL_STACK + 4)
 #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
 
-#ifdef CONFIG_TURRIS_OMNIA_SPL_BOOT_DEVICE_SPI
+#ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI
 /* SPL related SPI defines */
 # define CONFIG_SYS_SPI_U_BOOT_OFFS	0x24000
 # define CONFIG_SYS_U_BOOT_OFFS		CONFIG_SYS_SPI_U_BOOT_OFFS
 #endif
 
-#ifdef CONFIG_TURRIS_OMNIA_SPL_BOOT_DEVICE_MMC
+#ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC
 /* SPL related MMC defines */
 # define CONFIG_SYS_MMC_U_BOOT_OFFS		(160 << 10)
 # define CONFIG_SYS_U_BOOT_OFFS			CONFIG_SYS_MMC_U_BOOT_OFFS
-- 
2.17.1



More information about the U-Boot mailing list