[U-Boot] [PATCH v2 01/11] Kconfig: Separate AM33XX SOC config from target board config

Andrew F. Davis afd at ti.com
Mon Aug 22 17:21:21 CEST 2016


The config option AM33XX is used in several boards and should be
defined as a stand-alone option for this SOC. We break this out
from TARGET_AM335X_* then enable AM33XX on in all the boards that
used TARGET_AM335X_* to eliminate any functional change with
this patch. Also conditionally define this in ti_am335x_common.h to prevent
redefinition. The definition can be removed completely when all platforms
that include this header have this definition added to their defconfig.

This is similar to what has already been done in
9de852642cae ("arm: Kconfig: Add support for AM43xx SoC specific Kconfig")
and is done for the same reasons.

Signed-off-by: Andrew F. Davis <afd at ti.com>
---
 arch/arm/Kconfig                           | 51 +++++++-----------------------
 arch/arm/cpu/armv7/am33xx/Kconfig          | 49 ++++++++++++++++++++++++++++
 configs/am335x_baltos_defconfig            |  1 +
 configs/am335x_boneblack_defconfig         |  1 +
 configs/am335x_boneblack_vboot_defconfig   |  1 +
 configs/am335x_evm_defconfig               |  1 +
 configs/am335x_evm_nor_defconfig           |  1 +
 configs/am335x_evm_norboot_defconfig       |  1 +
 configs/am335x_evm_spiboot_defconfig       |  1 +
 configs/am335x_evm_usbspl_defconfig        |  1 +
 configs/am335x_igep0033_defconfig          |  1 +
 configs/am335x_shc_defconfig               |  1 +
 configs/am335x_shc_ict_defconfig           |  1 +
 configs/am335x_shc_netboot_defconfig       |  1 +
 configs/am335x_shc_prompt_defconfig        |  1 +
 configs/am335x_shc_sdboot_defconfig        |  1 +
 configs/am335x_shc_sdboot_prompt_defconfig |  1 +
 configs/am335x_sl50_defconfig              |  1 +
 include/configs/ti_am335x_common.h         |  2 ++
 19 files changed, 78 insertions(+), 40 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5ac9401..b4bdf8a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -331,14 +331,6 @@ config TARGET_PEPPER
 	select DM_SERIAL
 	select DM_GPIO
 
-config TARGET_AM335X_IGEP0033
-	bool "Support am335x_igep0033"
-	select CPU_V7
-	select SUPPORT_SPL
-	select DM
-	select DM_SERIAL
-	select DM_GPIO
-
 config TARGET_PCM051
 	bool "Support pcm051"
 	select CPU_V7
@@ -403,38 +395,6 @@ config TARGET_PENGWYN
 	select DM_SERIAL
 	select DM_GPIO
 
-config TARGET_AM335X_BALTOS
-	bool "Support am335x_baltos"
-	select CPU_V7
-	select SUPPORT_SPL
-	select DM
-	select DM_SERIAL
-	select DM_GPIO
-
-config TARGET_AM335X_EVM
-	bool "Support am335x_evm"
-	select CPU_V7
-	select SUPPORT_SPL
-	select DM
-	select DM_SERIAL
-	select DM_GPIO
-	select TI_I2C_BOARD_DETECT
-
-config TARGET_AM335X_SHC
-	bool "Support am335x based shc board from bosch"
-	select CPU_V7
-	select SUPPORT_SPL
-	select DM
-	select DM_SERIAL
-	select DM_GPIO
-
-config TARGET_AM335X_SL50
-	bool "Support am335x_sl50"
-	select CPU_V7
-	select SUPPORT_SPL
-	select DM
-	select DM_SERIAL
-
 config TARGET_BAV335X
 	bool "Support bav335x"
 	select CPU_V7
@@ -579,6 +539,17 @@ config AM43XX
 	  protocols, dual camera support, optional 3D graphics
 	  and an optional customer programmable secure boot.
 
+config AM33XX
+	bool "AM33XX SoC"
+	select CPU_V7
+	select SUPPORT_SPL
+	help
+	  Support for AM335x SOC from Texas Instruments.
+	  The AM335x high performance SOC features a Cortex-A8
+	  ARM core, a dual core PRU-ICSS for industrial Ethernet
+	  protocols, optional 3D graphics and an optional customer
+	  programmable secure boot.
+
 config RMOBILE
 	bool "Renesas ARM SoCs"
 	select CPU_V7
diff --git a/arch/arm/cpu/armv7/am33xx/Kconfig b/arch/arm/cpu/armv7/am33xx/Kconfig
index dc51e9b..d2fc31c 100644
--- a/arch/arm/cpu/armv7/am33xx/Kconfig
+++ b/arch/arm/cpu/armv7/am33xx/Kconfig
@@ -1,3 +1,50 @@
+if AM33XX
+
+choice
+	prompt "AM33xx board select"
+	optional
+
+config TARGET_AM335X_EVM
+	bool "Support am335x_evm"
+	select DM
+	select DM_SERIAL
+	select DM_GPIO
+	select TI_I2C_BOARD_DETECT
+	help
+	  This option specifies support for the AM335x
+	  GP and HS EVM development platforms. The AM335x
+	  GP EVM is a standalone test, development, and
+	  evaluation module system that enables developers
+	  to write software and develop hardware around
+	  an AM335x processor subsystem.
+
+config TARGET_AM335X_BALTOS
+	bool "Support am335x_baltos"
+	select DM
+	select DM_SERIAL
+	select DM_GPIO
+
+config TARGET_AM335X_IGEP0033
+	bool "Support am335x_igep0033"
+	select DM
+	select DM_SERIAL
+	select DM_GPIO
+
+config TARGET_AM335X_SHC
+	bool "Support am335x based shc board from bosch"
+	select DM
+	select DM_SERIAL
+	select DM_GPIO
+
+config TARGET_AM335X_SL50
+	bool "Support am335x_sl50"
+	select DM
+	select DM_SERIAL
+
+endchoice
+
+endif
+
 if AM43XX
 config TARGET_AM43XX_EVM
 	bool "Support am43xx_evm"
@@ -9,7 +56,9 @@ config TARGET_AM43XX_EVM
 	  evaluation module system that enables developers
 	  to write software and develop hardware around
 	  an AM43xx processor subsystem.
+endif
 
+if AM43XX || AM33XX
 config ISW_ENTRY_ADDR
 	hex "Address in memory or XIP flash of bootloader entry point"
 	help
diff --git a/configs/am335x_baltos_defconfig b/configs/am335x_baltos_defconfig
index 78f55cc..b6cfd07 100644
--- a/configs/am335x_baltos_defconfig
+++ b/configs/am335x_baltos_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_BALTOS=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_SPL=y
diff --git a/configs/am335x_boneblack_defconfig b/configs/am335x_boneblack_defconfig
index d310e0b..5fabff6 100644
--- a/configs/am335x_boneblack_defconfig
+++ b/configs/am335x_boneblack_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_SPL=y
diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig
index c2f09cb..b47b51f 100644
--- a/configs/am335x_boneblack_vboot_defconfig
+++ b/configs/am335x_boneblack_vboot_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_DEFAULT_DEVICE_TREE="am335x-boneblack"
diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index 6885230..b344bb7 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_DEFAULT_DEVICE_TREE="am335x-evm"
diff --git a/configs/am335x_evm_nor_defconfig b/configs/am335x_evm_nor_defconfig
index 76a004e..e434dec 100644
--- a/configs/am335x_evm_nor_defconfig
+++ b/configs/am335x_evm_nor_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_NOR=y
diff --git a/configs/am335x_evm_norboot_defconfig b/configs/am335x_evm_norboot_defconfig
index 99fc555..063eea7 100644
--- a/configs/am335x_evm_norboot_defconfig
+++ b/configs/am335x_evm_norboot_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_EVM=y
 CONFIG_NOR=y
 CONFIG_NOR_BOOT=y
diff --git a/configs/am335x_evm_spiboot_defconfig b/configs/am335x_evm_spiboot_defconfig
index 2fe1a25..89f472d 100644
--- a/configs/am335x_evm_spiboot_defconfig
+++ b/configs/am335x_evm_spiboot_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_SPL=y
diff --git a/configs/am335x_evm_usbspl_defconfig b/configs/am335x_evm_usbspl_defconfig
index cba5e84..b689181 100644
--- a/configs/am335x_evm_usbspl_defconfig
+++ b/configs/am335x_evm_usbspl_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_SPL=y
diff --git a/configs/am335x_igep0033_defconfig b/configs/am335x_igep0033_defconfig
index d6022a3..33e0637 100644
--- a/configs/am335x_igep0033_defconfig
+++ b/configs/am335x_igep0033_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_IGEP0033=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_SPL=y
diff --git a/configs/am335x_shc_defconfig b/configs/am335x_shc_defconfig
index c83311f..04d1c91 100644
--- a/configs/am335x_shc_defconfig
+++ b/configs/am335x_shc_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_SHC=y
 CONFIG_SERIES=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
diff --git a/configs/am335x_shc_ict_defconfig b/configs/am335x_shc_ict_defconfig
index bfb56b2..999dc60 100644
--- a/configs/am335x_shc_ict_defconfig
+++ b/configs/am335x_shc_ict_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_SHC=y
 CONFIG_SHC_ICT=y
 CONFIG_SERIES=y
diff --git a/configs/am335x_shc_netboot_defconfig b/configs/am335x_shc_netboot_defconfig
index d16c5f0..a6eaf6b 100644
--- a/configs/am335x_shc_netboot_defconfig
+++ b/configs/am335x_shc_netboot_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_SHC=y
 CONFIG_SHC_NETBOOT=y
 CONFIG_SERIES=y
diff --git a/configs/am335x_shc_prompt_defconfig b/configs/am335x_shc_prompt_defconfig
index b9bc355..e174ba9 100644
--- a/configs/am335x_shc_prompt_defconfig
+++ b/configs/am335x_shc_prompt_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_SHC=y
 CONFIG_SERIES=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
diff --git a/configs/am335x_shc_sdboot_defconfig b/configs/am335x_shc_sdboot_defconfig
index b0e8eff..7b3974c 100644
--- a/configs/am335x_shc_sdboot_defconfig
+++ b/configs/am335x_shc_sdboot_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_SHC=y
 CONFIG_SHC_SDBOOT=y
 CONFIG_SERIES=y
diff --git a/configs/am335x_shc_sdboot_prompt_defconfig b/configs/am335x_shc_sdboot_prompt_defconfig
index b0e8eff..7b3974c 100644
--- a/configs/am335x_shc_sdboot_prompt_defconfig
+++ b/configs/am335x_shc_sdboot_prompt_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_SHC=y
 CONFIG_SHC_SDBOOT=y
 CONFIG_SERIES=y
diff --git a/configs/am335x_sl50_defconfig b/configs/am335x_sl50_defconfig
index 01c1eeb..87ea29e 100644
--- a/configs/am335x_sl50_defconfig
+++ b/configs/am335x_sl50_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_SL50=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_SPL=y
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index bcd56fc..7a4c043 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -12,7 +12,9 @@
 #ifndef __CONFIG_TI_AM335X_COMMON_H__
 #define __CONFIG_TI_AM335X_COMMON_H__
 
+#ifndef CONFIG_AM33XX
 #define CONFIG_AM33XX
+#endif
 #define CONFIG_ARCH_CPU_INIT
 #define CONFIG_SYS_CACHELINE_SIZE       64
 #define CONFIG_MAX_RAM_BANK_SIZE	(1024 << 20)	/* 1GB */
-- 
2.9.3



More information about the U-Boot mailing list