[PATCH 1/7 V3] arm/kconfig: inverse the board selection

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Mon Nov 2 07:03:39 EST 2009


instead of select first the board which will select the arch, now
first choice the arch to filter the possible boards

as it's already done for omap

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 arch/arm/Kconfig              |   90 ++++++++++++++++++++++++++--------------
 arch/arm/mach-omap/Kconfig    |    3 +
 arch/arm/mach-s3c24xx/Kconfig |    4 --
 board/omap/Kconfig            |    1 -
 4 files changed, 61 insertions(+), 37 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 9cfcb7c..ac0c802 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -68,46 +68,61 @@ config ARM926EJS
 config ARMCORTEXA8
 	bool
 
-config ARCH_AT91RM9200
+config ARCH_AT91SAM9260
 	bool
-	select ARM920T
+	select ARM926EJS
 
-config ARCH_NETX
+config ARCH_AT91SAM9263
 	bool
 	select ARM926EJS
+	select MACH_HAS_LOWLEVEL_INIT
 
-config ARCH_OMAP
-	bool
+menu "System Type"
+
+choice
+	prompt "ARM system type"
 
 config ARCH_AT91
-	bool
+	bool "Atmel AT91"
 
-config ARCH_AT91SAM9260
-	bool
-	select ARM926EJS
-	select ARCH_AT91
+config ARCH_AT91RM9200
+	bool "Atmel AT91RM9200"
+	select ARM920T
 
-config ARCH_AT91SAM9263
-	bool
+config ARCH_IMX
+	bool "Freescale iMX-based"
+
+config ARCH_NETX
+	bool "Hilscher NetX based"
 	select ARM926EJS
-	select ARCH_AT91
-	select MACH_HAS_LOWLEVEL_INIT
+
+config ARCH_OMAP
+	bool "TI OMAP"
+
+config ARCH_S3C24xx
+	bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443"
+	select ARM920T
+
+endchoice
 
 choice
 	prompt "Select your board"
+	depends on !ARCH_OMAP
 
 config MACH_MX1ADS
 	bool "mx1ads"
-	select HAS_CS8900
+	depends on ARCH_IMX
 	select ARCH_IMX1
+	select HAS_CS8900
 	help
 	  Say Y here if you are using the Motorola MX1ADS board
 
 config MACH_SCB9328
 	bool "Synertronixx scb9328"
+	depends on ARCH_IMX
+	select ARCH_IMX1
 	select HAS_DM9000
 	select HAS_CFI
-	select ARCH_IMX1
 	select MACH_HAS_LOWLEVEL_INIT
 	select HAVE_MMU
 	help
@@ -115,8 +130,9 @@ config MACH_SCB9328
 
 config MACH_PCM038
 	bool "phyCORE-i.MX27"
-	select HAS_CFI
+	depends on ARCH_IMX
 	select ARCH_IMX27
+	select HAS_CFI
 	select MACH_HAS_LOWLEVEL_INIT
 	select SPI
 	select DRIVER_SPI_IMX
@@ -128,8 +144,9 @@ config MACH_PCM038
 
 config MACH_IMX21ADS
 	bool "Freescale i.MX21ADS"
-	select HAS_CFI
+	depends on ARCH_IMX
 	select ARCH_IMX21
+	select HAS_CFI
 	select MACH_HAS_LOWLEVEL_INIT
 	select HAS_CS8900
 	help
@@ -138,8 +155,9 @@ config MACH_IMX21ADS
 
 config MACH_IMX27ADS
 	bool "Freescale i.MX27ADS"
-	select HAS_CFI
+	depends on ARCH_IMX
 	select ARCH_IMX27
+	select HAS_CFI
 	select MACH_HAS_LOWLEVEL_INIT
 	help
 	  Say Y here if you are using the Freescale i.MX27ads board equipped
@@ -147,8 +165,9 @@ config MACH_IMX27ADS
 
 config MACH_PCM043
         bool "phyCORE-i.MX35"
+	depends on ARCH_IMX
+	select ARCH_IMX35
         select HAS_CFI
-        select ARCH_IMX35
         select MACH_HAS_LOWLEVEL_INIT
         help
           Say Y here if you are using Phytec's phyCORE-i.MX35 (pcm043) equipped
@@ -156,8 +175,9 @@ config MACH_PCM043
 
 config MACH_FREESCALE_MX35_3STACK
 	bool "Freescale MX35 3stack"
-	select HAS_CFI
+	depends on ARCH_IMX
 	select ARCH_IMX35
+	select HAS_CFI
 	select MACH_HAS_LOWLEVEL_INIT
 	help
 	  Say Y here if you are using the Freescale MX35 3stack board equipped
@@ -165,8 +185,9 @@ config MACH_FREESCALE_MX35_3STACK
 
 config MACH_FREESCALE_MX25_3STACK
 	bool "Freescale MX25 3stack"
-	select HAS_CFI
+	depends on ARCH_IMX
 	select ARCH_IMX25
+	select HAS_CFI
 	select MACH_HAS_LOWLEVEL_INIT
 	help
 	  Say Y here if you are using the Freescale MX25 3stack board equipped
@@ -174,56 +195,55 @@ config MACH_FREESCALE_MX25_3STACK
 
 config MACH_ECO920
 	bool "eco920"
+	depends on ARCH_AT91RM9200
 	select HAS_AT91_ETHER
 	select HAS_CFI
-	select ARCH_AT91RM9200
 	help
 	  Say Y here if you are using the Motorola MX1ADS board
 
 config MACH_NXDB500
 	bool "Hilscher Netx nxdb500"
+	depends on ARCH_NETX
 	select HAS_NETX_ETHER
 	select HAS_CFI
-	select ARCH_NETX
 	select MACH_HAS_LOWLEVEL_INIT
 	help
 	  Say Y here if you are using the Hilscher Netx nxdb500 board
 
 config MACH_PCM037
 	bool "phyCORE-i.MX31"
-	select MACH_HAS_LOWLEVEL_INIT
+	depends on ARCH_IMX
 	select ARCH_IMX31
+	select MACH_HAS_LOWLEVEL_INIT
 	select USB_ISP1504 if USB
 	help
 	  Say Y here if you are using Phytec's phyCORE-i.MX31 (pcm037) equipped
 	  with a Freescale i.MX31 Processor
 
-config MACH_OMAP
-	bool "Texas Instruments' OMAP based platforms"
-	select ARCH_OMAP
-	help
-	  Say Y if you are using Texas Instrument's OMAP based platforms
-
 config MACH_AT91SAM9260_EK
 	bool "Atmel AT91SAM9260-EK"
+	depends on ARCH_AT91
 	select ARCH_AT91SAM9260
 	help
 	  Say y here if you are using Atmel's AT91SAM9260-EK Evaluation board
 
 config MACH_AT91SAM9263_EK
 	bool "Atmel AT91SAM9263-EK"
+	depends on ARCH_AT91
 	select ARCH_AT91SAM9263
 	help
 	  Say y here if you are using Atmel's AT91SAM9263-EK Evaluation board
 
 config MACH_PM9263
 	bool "Ronetix PM9263"
+	depends on ARCH_AT91
 	select ARCH_AT91SAM9263
 	help
 	  Say y here if you are using the Ronetix PM9263 Board
 
 config MACH_A9M2410
 	bool "Digi A9M2410"
+	depends on ARCH_S3C24xx
 	select CPU_S3C2410
 	select MACH_HAS_LOWLEVEL_INIT
 	select S3C24XX_PLL_INIT
@@ -234,6 +254,7 @@ config MACH_A9M2410
 
 config MACH_A9M2440
 	bool "Digi A9M2440"
+	depends on ARCH_S3C24xx
 	select CPU_S3C2440
 	select MACH_HAS_LOWLEVEL_INIT
 	select S3C24XX_PLL_INIT
@@ -243,6 +264,7 @@ config MACH_A9M2440
 
 config MACH_PCA100
 	bool "phyCard-i.MX27"
+	depends on ARCH_IMX
 	select ARCH_IMX27
 	select MACH_HAS_LOWLEVEL_INIT
 	select HAVE_MMU
@@ -252,14 +274,16 @@ config MACH_PCA100
 
 config MACH_MMCCPU
 	bool "Bucyrus MMC-CPU"
+	depends on ARCH_AT91
 	select ARCH_AT91SAM9263
 	help
 	  Say y here if you are using the Bucyrus MMC-CPU
 
 config MACH_EUKREA_CPUIMX27
 	bool "EUKREA CPUIMX27"
-	select HAS_CFI
+	depends on ARCH_IMX
 	select ARCH_IMX27
+	select HAS_CFI
 	select MACH_HAS_LOWLEVEL_INIT
 	help
 	  Say Y here if you are using Eukrea's CPUIMX27 equipped
@@ -272,6 +296,8 @@ source arch/arm/mach-netx/Kconfig
 source arch/arm/mach-omap/Kconfig
 source arch/arm/mach-s3c24xx/Kconfig
 
+endmenu
+
 menu "Arm specific settings         "
 
 config CMD_ARM_CPUINFO
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index 69f6370..c7a0aad 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -23,6 +23,9 @@
 menu "OMAP Features"
 	depends on ARCH_OMAP
 
+config MACH_OMAP
+	bool
+
 choice
 	prompt "Select OMAP Variant"
 
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 6a3426c..1ad59f6 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -1,8 +1,4 @@
 
-config ARCH_S3C24xx
-	bool
-	select ARM920T
-
 config CPU_S3C2410
 	select ARCH_S3C24xx
 	bool
diff --git a/board/omap/Kconfig b/board/omap/Kconfig
index 625fdac..07ba87c 100644
--- a/board/omap/Kconfig
+++ b/board/omap/Kconfig
@@ -26,7 +26,6 @@ config ARCH_TEXT_BASE
 	default 0x80e80000 if MACH_BEAGLE
 
 menu "OMAP Platform Features"
-	depends on MACH_OMAP
 
 config BOARDINFO
 	default "Texas Instrument's SDP343x" if MACH_OMAP343xSDP
-- 
1.6.5





More information about the u-boot-v2 mailing list