[U-Boot] [PATCH 3/6] ARM: socfpga: move board select into mach-socfpga/Kconfig

Masahiro Yamada yamada.masahiro at socionext.com
Tue Apr 21 04:09:55 CEST 2015


Switch to a more standard way of board select; put the SoC select
into arch/arm/Kconfig and move the board select menu under
arch/arm/mach-socfpga/Kconfig.

Also, consolidate SYS_BOARD, SYS_VENDOR, SYS_SOC, SYS_CONFIG_NAME.

Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
---

 arch/arm/Kconfig                   | 15 ++++-----------
 arch/arm/mach-socfpga/Kconfig      | 27 +++++++++++++++++++++++++++
 board/altera/socfpga/Kconfig       | 31 -------------------------------
 configs/socfpga_arria5_defconfig   |  1 +
 configs/socfpga_cyclone5_defconfig |  1 +
 configs/socfpga_socrates_defconfig |  1 +
 6 files changed, 34 insertions(+), 42 deletions(-)
 create mode 100644 arch/arm/mach-socfpga/Kconfig
 delete mode 100644 board/altera/socfpga/Kconfig

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 3702bb0..ac7a11b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -634,16 +634,8 @@ config TARGET_CM_FX6
 	select DM_SERIAL
 	select DM_GPIO
 
-config TARGET_SOCFPGA_ARRIA5
-	bool "Support socfpga_arria5"
-	select CPU_V7
-	select SUPPORT_SPL
-	select DM
-	select DM_SPI_FLASH
-	select DM_SPI
-
-config TARGET_SOCFPGA_CYCLONE5
-	bool "Support socfpga_cyclone5"
+config ARCH_SOCFPGA
+	bool "Altera SOCFPGA family"
 	select CPU_V7
 	select SUPPORT_SPL
 	select DM
@@ -819,6 +811,8 @@ source "arch/arm/cpu/armv7/rmobile/Kconfig"
 
 source "arch/arm/cpu/armv7/s5pc1xx/Kconfig"
 
+source "arch/arm/mach-socfpga/Kconfig"
+
 source "arch/arm/mach-tegra/Kconfig"
 
 source "arch/arm/mach-uniphier/Kconfig"
@@ -840,7 +834,6 @@ source "board/CarMediaLab/flea3/Kconfig"
 source "board/Marvell/aspenite/Kconfig"
 source "board/Marvell/db-mv784mp-gp/Kconfig"
 source "board/Marvell/gplugd/Kconfig"
-source "board/altera/socfpga/Kconfig"
 source "board/armadeus/apf27/Kconfig"
 source "board/armltd/integrator/Kconfig"
 source "board/armltd/vexpress/Kconfig"
diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
new file mode 100644
index 0000000..204efca
--- /dev/null
+++ b/arch/arm/mach-socfpga/Kconfig
@@ -0,0 +1,27 @@
+if ARCH_SOCFPGA
+
+choice
+	prompt "Altera SOCFPGA board select"
+
+config TARGET_SOCFPGA_ARRIA5
+	bool "Altera SOCFPGA Arria V"
+
+config TARGET_SOCFPGA_CYCLONE5
+	bool "Altera SOCFPGA Cyclone V"
+
+endchoice
+
+config SYS_BOARD
+	default "socfpga"
+
+config SYS_VENDOR
+	default "altera"
+
+config SYS_SOC
+	default "socfpga"
+
+config SYS_CONFIG_NAME
+	default "socfpga_arria5" if TARGET_SOCFPGA_ARRIA5
+	default "socfpga_cyclone5" if TARGET_SOCFPGA_CYCLONE5
+
+endif
diff --git a/board/altera/socfpga/Kconfig b/board/altera/socfpga/Kconfig
deleted file mode 100644
index cbed8d6..0000000
--- a/board/altera/socfpga/Kconfig
+++ /dev/null
@@ -1,31 +0,0 @@
-if TARGET_SOCFPGA_CYCLONE5
-
-config SYS_BOARD
-	default "socfpga"
-
-config SYS_VENDOR
-	default "altera"
-
-config SYS_SOC
-	default "socfpga"
-
-config SYS_CONFIG_NAME
-	default "socfpga_cyclone5"
-
-endif
-
-if TARGET_SOCFPGA_ARRIA5
-
-config SYS_BOARD
-	default "socfpga"
-
-config SYS_VENDOR
-	default "altera"
-
-config SYS_SOC
-	default "socfpga"
-
-config SYS_CONFIG_NAME
-	default "socfpga_arria5"
-
-endif
diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
index 52032e5..d658a50 100644
--- a/configs/socfpga_arria5_defconfig
+++ b/configs/socfpga_arria5_defconfig
@@ -1,5 +1,6 @@
 CONFIG_SPL=y
 CONFIG_ARM=y
+CONFIG_ARCH_SOCFPGA=y
 CONFIG_TARGET_SOCFPGA_ARRIA5=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria5_socdk"
diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index 6c982ab..a67b0c1 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_defconfig
@@ -1,5 +1,6 @@
 CONFIG_SPL=y
 CONFIG_ARM=y
+CONFIG_ARCH_SOCFPGA=y
 CONFIG_TARGET_SOCFPGA_CYCLONE5=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk"
diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index c81ab0f..1aa3ee5 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -1,5 +1,6 @@
 CONFIG_SPL=y
 CONFIG_ARM=y
+CONFIG_ARCH_SOCFPGA=y
 CONFIG_TARGET_SOCFPGA_CYCLONE5=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates"
-- 
1.9.1



More information about the U-Boot mailing list