[U-Boot] [PATCH v2 1/4] arm: imx: mx23: Move MX23 selection to Kconfig

Stefan Agner stefan at agner.ch
Tue Feb 6 08:44:34 UTC 2018


From: Stefan Agner <stefan.agner at toradex.com>

The motivation for moving MX23 selection to Kconfig is to be able
to better handle NAND MXS selection through Kconfig.

This selection method also aligns with the way other i.MX SoCs are
selected in U-Boot.

Signed-off-by: Stefan Agner <stefan.agner at toradex.com>
---

Changes in v2:
- Move to arch/arm/mach-imx/mxs/Kconfig
- Fix SoC name

 arch/arm/Kconfig                  | 38 ++++++++------------------------------
 arch/arm/mach-imx/mxs/Kconfig     | 35 +++++++++++++++++++++++++++++++++++
 configs/mx23_olinuxino_defconfig  |  3 ++-
 configs/mx23evk_defconfig         |  3 ++-
 configs/sansa_fuze_plus_defconfig |  1 +
 configs/xfi3_defconfig            |  3 ++-
 include/configs/mx23_olinuxino.h  |  1 -
 include/configs/mx23evk.h         |  1 -
 include/configs/sansa_fuze_plus.h |  3 ---
 include/configs/xfi3.h            |  3 ---
 scripts/config_whitelist.txt      |  1 -
 11 files changed, 50 insertions(+), 42 deletions(-)
 create mode 100644 arch/arm/mach-imx/mxs/Kconfig

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 880a56ba90..59b0588027 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -402,25 +402,12 @@ config TARGET_APX4DEVKIT
 	select SUPPORT_SPL
 	select PL011_SERIAL
 
-config TARGET_XFI3
-	bool "Support xfi3"
-	select CPU_ARM926EJS
-	select SUPPORT_SPL
-	select PL011_SERIAL
-
 config TARGET_M28EVK
 	bool "Support m28evk"
 	select CPU_ARM926EJS
 	select SUPPORT_SPL
 	select PL011_SERIAL
 
-config TARGET_MX23EVK
-	bool "Support mx23evk"
-	select CPU_ARM926EJS
-	select SUPPORT_SPL
-	select BOARD_EARLY_INIT_F
-	select PL011_SERIAL
-
 config TARGET_MX28EVK
 	bool "Support mx28evk"
 	select CPU_ARM926EJS
@@ -428,25 +415,12 @@ config TARGET_MX28EVK
 	select BOARD_EARLY_INIT_F
 	select PL011_SERIAL
 
-config TARGET_MX23_OLINUXINO
-	bool "Support mx23_olinuxino"
-	select CPU_ARM926EJS
-	select SUPPORT_SPL
-	select BOARD_EARLY_INIT_F
-	select PL011_SERIAL
-
 config TARGET_BG0900
 	bool "Support bg0900"
 	select CPU_ARM926EJS
 	select SUPPORT_SPL
 	select PL011_SERIAL
 
-config TARGET_SANSA_FUZE_PLUS
-	bool "Support sansa_fuze_plus"
-	select CPU_ARM926EJS
-	select SUPPORT_SPL
-	select PL011_SERIAL
-
 config TARGET_SC_SPS_1
 	bool "Support sc_sps_1"
 	select CPU_ARM926EJS
@@ -666,6 +640,12 @@ config ARCH_MX8M
 	select DM
 	select SUPPORT_SPL
 
+config ARCH_MX23
+	bool "NXP i.MX23 family"
+	select CPU_ARM926EJS
+	select PL011_SERIAL
+	select SUPPORT_SPL
+
 config ARCH_MX25
 	bool "NXP MX25"
 	select CPU_ARM926EJS
@@ -1270,6 +1250,8 @@ source "arch/arm/mach-imx/mx7ulp/Kconfig"
 
 source "arch/arm/mach-imx/mx8m/Kconfig"
 
+source "arch/arm/mach-imx/mxs/Kconfig"
+
 source "arch/arm/mach-omap2/Kconfig"
 
 source "arch/arm/cpu/armv8/fsl-layerscape/Kconfig"
@@ -1328,7 +1310,6 @@ source "board/broadcom/bcmnsp/Kconfig"
 source "board/broadcom/bcmns2/Kconfig"
 source "board/cavium/thunderx/Kconfig"
 source "board/cirrus/edb93xx/Kconfig"
-source "board/creative/xfi3/Kconfig"
 source "board/eets/pdu001/Kconfig"
 source "board/freescale/ls2080a/Kconfig"
 source "board/freescale/ls2080aqds/Kconfig"
@@ -1344,7 +1325,6 @@ source "board/freescale/ls1046ardb/Kconfig"
 source "board/freescale/ls1012aqds/Kconfig"
 source "board/freescale/ls1012ardb/Kconfig"
 source "board/freescale/ls1012afrdm/Kconfig"
-source "board/freescale/mx23evk/Kconfig"
 source "board/freescale/mx28evk/Kconfig"
 source "board/freescale/mx31ads/Kconfig"
 source "board/freescale/mx31pdk/Kconfig"
@@ -1358,10 +1338,8 @@ source "board/hisilicon/hikey/Kconfig"
 source "board/hisilicon/poplar/Kconfig"
 source "board/imx31_phycore/Kconfig"
 source "board/isee/igep003x/Kconfig"
-source "board/olimex/mx23_olinuxino/Kconfig"
 source "board/phytec/pcm051/Kconfig"
 source "board/ppcag/bg0900/Kconfig"
-source "board/sandisk/sansa_fuze_plus/Kconfig"
 source "board/schulercontrol/sc_sps_1/Kconfig"
 source "board/silica/pengwyn/Kconfig"
 source "board/spear/spear300/Kconfig"
diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig
new file mode 100644
index 0000000000..f984545887
--- /dev/null
+++ b/arch/arm/mach-imx/mxs/Kconfig
@@ -0,0 +1,35 @@
+if ARCH_MX23
+
+config MX23
+	bool
+	default y
+
+choice
+	prompt "MX23 board select"
+	optional
+
+config TARGET_MX23_OLINUXINO
+	bool "Support mx23_olinuxino"
+	select BOARD_EARLY_INIT_F
+
+config TARGET_MX23EVK
+	bool "Support mx23evk"
+	select BOARD_EARLY_INIT_F
+
+config TARGET_SANSA_FUZE_PLUS
+	bool "Support sansa_fuze_plus"
+
+config TARGET_XFI3
+	bool "Support xfi3"
+
+endchoice
+
+config SYS_SOC
+	default "mxs"
+
+source "board/olimex/mx23_olinuxino/Kconfig"
+source "board/freescale/mx23evk/Kconfig"
+source "board/sandisk/sansa_fuze_plus/Kconfig"
+source "board/creative/xfi3/Kconfig"
+
+endif
diff --git a/configs/mx23_olinuxino_defconfig b/configs/mx23_olinuxino_defconfig
index 628c11d851..d70ca52da2 100644
--- a/configs/mx23_olinuxino_defconfig
+++ b/configs/mx23_olinuxino_defconfig
@@ -1,8 +1,9 @@
 CONFIG_ARM=y
-CONFIG_TARGET_MX23_OLINUXINO=y
+CONFIG_ARCH_MX23=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_TARGET_MX23_OLINUXINO=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_BOOTDELAY=3
 CONFIG_VERSION_VARIABLE=y
diff --git a/configs/mx23evk_defconfig b/configs/mx23evk_defconfig
index 6ad7f2cb8d..a7f08caf1a 100644
--- a/configs/mx23evk_defconfig
+++ b/configs/mx23evk_defconfig
@@ -1,8 +1,9 @@
 CONFIG_ARM=y
-CONFIG_TARGET_MX23EVK=y
+CONFIG_ARCH_MX23=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_TARGET_MX23EVK=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
diff --git a/configs/sansa_fuze_plus_defconfig b/configs/sansa_fuze_plus_defconfig
index f2e61c7ab5..fd0afa5bfd 100644
--- a/configs/sansa_fuze_plus_defconfig
+++ b/configs/sansa_fuze_plus_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_ARCH_MX23=y
 CONFIG_TARGET_SANSA_FUZE_PLUS=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/xfi3_defconfig b/configs/xfi3_defconfig
index 6cdea5eb35..a2362f84e7 100644
--- a/configs/xfi3_defconfig
+++ b/configs/xfi3_defconfig
@@ -1,8 +1,9 @@
 CONFIG_ARM=y
-CONFIG_TARGET_XFI3=y
+CONFIG_ARCH_MX23=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_TARGET_XFI3=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h
index 36ef186510..bca62efd57 100644
--- a/include/configs/mx23_olinuxino.h
+++ b/include/configs/mx23_olinuxino.h
@@ -7,7 +7,6 @@
 #define __CONFIGS_MX23_OLINUXINO_H__
 
 /* System configurations */
-#define CONFIG_MX23				/* i.MX23 SoC */
 #define CONFIG_MACH_TYPE	4105
 
 /* U-Boot Commands */
diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h
index 9b54d20e21..16723968f0 100644
--- a/include/configs/mx23evk.h
+++ b/include/configs/mx23evk.h
@@ -10,7 +10,6 @@
 #define __CONFIGS_MX23EVK_H__
 
 /* System configurations */
-#define CONFIG_MX23				/* i.MX23 SoC */
 #define CONFIG_MACH_TYPE	MACH_TYPE_MX23EVK
 
 /* U-Boot Commands */
diff --git a/include/configs/sansa_fuze_plus.h b/include/configs/sansa_fuze_plus.h
index 99200140fe..3bf1601a7d 100644
--- a/include/configs/sansa_fuze_plus.h
+++ b/include/configs/sansa_fuze_plus.h
@@ -6,9 +6,6 @@
 #ifndef __CONFIGS_SANSA_FUZE_PLUS_H__
 #define __CONFIGS_SANSA_FUZE_PLUS_H__
 
-/* System configurations */
-#define CONFIG_MX23				/* i.MX23 SoC */
-
 /* U-Boot Commands */
 
 /* Memory configuration */
diff --git a/include/configs/xfi3.h b/include/configs/xfi3.h
index 1e70a762e0..2f77accda2 100644
--- a/include/configs/xfi3.h
+++ b/include/configs/xfi3.h
@@ -6,9 +6,6 @@
 #ifndef __CONFIGS_XFI3_H__
 #define __CONFIGS_XFI3_H__
 
-/* System configurations */
-#define CONFIG_MX23				/* i.MX23 SoC */
-
 /* U-Boot Commands */
 
 /* Memory configuration */
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index ef83c00c1b..ff27abaffd 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -1409,7 +1409,6 @@ CONFIG_MVSATA_IDE_USE_PORT1
 CONFIG_MV_ETH_RXQ
 CONFIG_MV_I2C_NUM
 CONFIG_MV_I2C_REG
-CONFIG_MX23
 CONFIG_MX25_CLK32
 CONFIG_MX25_HCLK_FREQ
 CONFIG_MX27
-- 
2.16.1



More information about the U-Boot mailing list