tegra: kconfig: move board select menu and common settings
Becuase the board select menu in arch/arm/Kconfig is too big,
move the Tegra board select menu to tegra/Kconfig.
Insert the Tegra SoC select menu between the arch select and the
board select.
Architecture select
|-- Tegra Platform (Tegra)
|- Tegra SoC select (Tegra20 / 30 / 114 / 124)
|- Board select
Consolidate also common settings (CONFIG_SYS_CPU="armv7" and
CONFIG_SYS_SOC="tegra*") and always "select" CONFIG_SPL as follows:
config TEGRA
bool
select SPL
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index cac9143..c81307a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -671,56 +671,9 @@
config ZYNQ
bool "Xilinx Zynq Platform"
-config TARGET_MEDCOM_WIDE
- bool "Support medcom-wide"
-
-config TARGET_PLUTUX
- bool "Support plutux"
-
-config TARGET_TEC
- bool "Support tec"
-
-config TARGET_PAZ00
- bool "Support paz00"
-
-config TARGET_TRIMSLICE
- bool "Support trimslice"
-
-config TARGET_HARMONY
- bool "Support harmony"
-
-config TARGET_SEABOARD
- bool "Support seaboard"
-
-config TARGET_VENTANA
- bool "Support ventana"
-
-config TARGET_WHISTLER
- bool "Support whistler"
-
-config TARGET_COLIBRI_T20_IRIS
- bool "Support colibri_t20_iris"
-
-config TARGET_COLIBRI_T30
- bool "Support Colibri T30"
-
-config TARGET_TEC_NG
- bool "Support tec-ng"
-
-config TARGET_BEAVER
- bool "Support beaver"
-
-config TARGET_CARDHU
- bool "Support cardhu"
-
-config TARGET_DALMORE
- bool "Support dalmore"
-
-config TARGET_JETSON_TK1
- bool "Support jetson-tk1"
-
-config TARGET_VENICE2
- bool "Support venice2"
+config TEGRA
+ bool "NVIDIA Tegra"
+ select SPL
config TARGET_VEXPRESS_AEMV8A
bool "Support vexpress_aemv8a"
@@ -775,7 +728,10 @@
endchoice
+source "arch/arm/cpu/armv7/tegra-common/Kconfig"
+
source "arch/arm/cpu/armv7/zynq/Kconfig"
+
source "board/8dtech/eco5pk/Kconfig"
source "board/aristainetos/Kconfig"
source "board/Barix/ipam390/Kconfig"
@@ -818,10 +774,6 @@
source "board/atmel/at91sam9x5ek/Kconfig"
source "board/atmel/sama5d3_xplained/Kconfig"
source "board/atmel/sama5d3xek/Kconfig"
-source "board/avionic-design/medcom-wide/Kconfig"
-source "board/avionic-design/plutux/Kconfig"
-source "board/avionic-design/tec-ng/Kconfig"
-source "board/avionic-design/tec/Kconfig"
source "board/balloon3/Kconfig"
source "board/barco/titanium/Kconfig"
source "board/bluegiga/apx4devkit/Kconfig"
@@ -839,11 +791,9 @@
source "board/cm4008/Kconfig"
source "board/cm41xx/Kconfig"
source "board/comelit/dig297/Kconfig"
-source "board/compal/paz00/Kconfig"
source "board/compulab/cm_t335/Kconfig"
source "board/compulab/cm_t35/Kconfig"
source "board/compulab/cm_t54/Kconfig"
-source "board/compulab/trimslice/Kconfig"
source "board/congatec/cgtqmx6eval/Kconfig"
source "board/corscience/tricorder/Kconfig"
source "board/creative/xfi3/Kconfig"
@@ -915,15 +865,6 @@
source "board/matrix_vision/mvblx/Kconfig"
source "board/mpl/vcma9/Kconfig"
source "board/nokia/rx51/Kconfig"
-source "board/nvidia/beaver/Kconfig"
-source "board/nvidia/cardhu/Kconfig"
-source "board/nvidia/dalmore/Kconfig"
-source "board/nvidia/harmony/Kconfig"
-source "board/nvidia/jetson-tk1/Kconfig"
-source "board/nvidia/seaboard/Kconfig"
-source "board/nvidia/venice2/Kconfig"
-source "board/nvidia/ventana/Kconfig"
-source "board/nvidia/whistler/Kconfig"
source "board/olimex/mx23_olinuxino/Kconfig"
source "board/omicron/calimain/Kconfig"
source "board/overo/Kconfig"
@@ -995,8 +936,6 @@
source "board/timll/devkit3250/Kconfig"
source "board/timll/devkit8000/Kconfig"
source "board/toradex/colibri_pxa270/Kconfig"
-source "board/toradex/colibri_t20_iris/Kconfig"
-source "board/toradex/colibri_t30/Kconfig"
source "board/trizepsiv/Kconfig"
source "board/ttcontrol/vision2/Kconfig"
source "board/udoo/Kconfig"
diff --git a/arch/arm/cpu/armv7/tegra-common/Kconfig b/arch/arm/cpu/armv7/tegra-common/Kconfig
new file mode 100644
index 0000000..8e2153b
--- /dev/null
+++ b/arch/arm/cpu/armv7/tegra-common/Kconfig
@@ -0,0 +1,30 @@
+if TEGRA
+
+choice
+ prompt "Tegra SoC select"
+
+config TEGRA20
+ bool "Tegra20 family"
+
+config TEGRA30
+ bool "Tegra30 family"
+
+config TEGRA114
+ bool "Tegra114 family"
+
+config TEGRA124
+ bool "Tegra124 family"
+
+endchoice
+
+config SYS_CPU
+ string
+ default "arm720t" if SPL_BUILD
+ default "armv7" if !SPL_BUILD
+
+source "arch/arm/cpu/armv7/tegra20/Kconfig"
+source "arch/arm/cpu/armv7/tegra30/Kconfig"
+source "arch/arm/cpu/armv7/tegra114/Kconfig"
+source "arch/arm/cpu/armv7/tegra124/Kconfig"
+
+endif
diff --git a/arch/arm/cpu/armv7/tegra114/Kconfig b/arch/arm/cpu/armv7/tegra114/Kconfig
new file mode 100644
index 0000000..33a22da
--- /dev/null
+++ b/arch/arm/cpu/armv7/tegra114/Kconfig
@@ -0,0 +1,17 @@
+if TEGRA114
+
+choice
+ prompt "Tegra114 board select"
+
+config TARGET_DALMORE
+ bool "NVIDIA Tegra114 Dalmore evaluation board"
+
+endchoice
+
+config SYS_SOC
+ string
+ default "tegra114"
+
+source "board/nvidia/dalmore/Kconfig"
+
+endif
diff --git a/arch/arm/cpu/armv7/tegra124/Kconfig b/arch/arm/cpu/armv7/tegra124/Kconfig
new file mode 100644
index 0000000..753f511
--- /dev/null
+++ b/arch/arm/cpu/armv7/tegra124/Kconfig
@@ -0,0 +1,21 @@
+if TEGRA124
+
+choice
+ prompt "Tegra124 board select"
+
+config TARGET_JETSON_TK1
+ bool "NVIDIA Tegra124 Jetson TK1 board"
+
+config TARGET_VENICE2
+ bool "NVIDIA Tegra124 Venice2"
+
+endchoice
+
+config SYS_SOC
+ string
+ default "tegra124"
+
+source "board/nvidia/jetson-tk1/Kconfig"
+source "board/nvidia/venice2/Kconfig"
+
+endif
diff --git a/arch/arm/cpu/armv7/tegra20/Kconfig b/arch/arm/cpu/armv7/tegra20/Kconfig
new file mode 100644
index 0000000..e2e0890
--- /dev/null
+++ b/arch/arm/cpu/armv7/tegra20/Kconfig
@@ -0,0 +1,53 @@
+if TEGRA20
+
+choice
+ prompt "Tegra20 board select"
+
+config TARGET_HARMONY
+ bool "NVIDIA Tegra20 Harmony evaluation board"
+
+config TARGET_MEDCOM_WIDE
+ bool "Avionic Design Medcom-Wide board"
+
+config TARGET_PAZ00
+ bool "Paz00 board"
+
+config TARGET_PLUTUX
+ bool "Avionic Design Plutux board"
+
+config TARGET_SEABOARD
+ bool "NVIDIA Seaboard"
+
+config TARGET_TEC
+ bool "Avionic Design Tamonten Evaluation Carrier"
+
+config TARGET_TRIMSLICE
+ bool "Compulab TrimSlice board"
+
+config TARGET_VENTANA
+ bool "NVIDIA Tegra20 Ventana evaluation board"
+
+config TARGET_WHISTLER
+ bool "NVIDIA Tegra20 Whistler evaluation board"
+
+config TARGET_COLIBRI_T20_IRIS
+ bool "Toradex Colibri T20 board"
+
+endchoice
+
+config SYS_SOC
+ string
+ default "tegra20"
+
+source "board/nvidia/harmony/Kconfig"
+source "board/avionic-design/medcom-wide/Kconfig"
+source "board/compal/paz00/Kconfig"
+source "board/avionic-design/plutux/Kconfig"
+source "board/nvidia/seaboard/Kconfig"
+source "board/avionic-design/tec/Kconfig"
+source "board/compulab/trimslice/Kconfig"
+source "board/nvidia/ventana/Kconfig"
+source "board/nvidia/whistler/Kconfig"
+source "board/toradex/colibri_t20_iris/Kconfig"
+
+endif
diff --git a/arch/arm/cpu/armv7/tegra30/Kconfig b/arch/arm/cpu/armv7/tegra30/Kconfig
new file mode 100644
index 0000000..694e1cd
--- /dev/null
+++ b/arch/arm/cpu/armv7/tegra30/Kconfig
@@ -0,0 +1,29 @@
+if TEGRA30
+
+choice
+ prompt "Tegra30 board select"
+
+config TARGET_BEAVER
+ bool "NVIDIA Tegra30 Beaver evaluation board"
+
+config TARGET_CARDHU
+ bool "NVIDIA Tegra30 Cardhu evaluation board"
+
+config TARGET_COLIBRI_T30
+ bool "Toradex Colibri T30 board"
+
+config TARGET_TEC_NG
+ bool "Avionic Design TEC-NG board"
+
+endchoice
+
+config SYS_SOC
+ string
+ default "tegra30"
+
+source "board/nvidia/beaver/Kconfig"
+source "board/nvidia/cardhu/Kconfig"
+source "board/toradex/colibri_t30/Kconfig"
+source "board/avionic-design/tec-ng/Kconfig"
+
+endif
diff --git a/arch/arm/include/asm/arch-tegra114/tegra.h b/arch/arm/include/asm/arch-tegra114/tegra.h
index 705ca57..5d426b5 100644
--- a/arch/arm/include/asm/arch-tegra114/tegra.h
+++ b/arch/arm/include/asm/arch-tegra114/tegra.h
@@ -17,8 +17,6 @@
#ifndef _TEGRA114_H_
#define _TEGRA114_H_
-#define CONFIG_TEGRA114
-
#define NV_PA_SDRAM_BASE 0x80000000 /* 0x80000000 for real T114 */
#define NV_PA_TSC_BASE 0x700F0000 /* System Counter TSC regs */
diff --git a/arch/arm/include/asm/arch-tegra124/tegra.h b/arch/arm/include/asm/arch-tegra124/tegra.h
index 86ebd19..db3d837 100644
--- a/arch/arm/include/asm/arch-tegra124/tegra.h
+++ b/arch/arm/include/asm/arch-tegra124/tegra.h
@@ -8,8 +8,6 @@
#ifndef _TEGRA124_H_
#define _TEGRA124_H_
-#define CONFIG_TEGRA124
-
#define NV_PA_SDRAM_BASE 0x80000000
#define NV_PA_TSC_BASE 0x700F0000 /* System Counter TSC regs */
#define NV_PA_MC_BASE 0x70019000 /* Mem Ctlr regs (MCB, etc.) */
diff --git a/arch/arm/include/asm/arch-tegra20/tegra.h b/arch/arm/include/asm/arch-tegra20/tegra.h
index 6a4b40e..18856ac 100644
--- a/arch/arm/include/asm/arch-tegra20/tegra.h
+++ b/arch/arm/include/asm/arch-tegra20/tegra.h
@@ -8,8 +8,6 @@
#ifndef _TEGRA20_H_
#define _TEGRA20_H_
-#define CONFIG_TEGRA20
-
#define NV_PA_SDRAM_BASE 0x00000000
#include <asm/arch-tegra/tegra.h>
diff --git a/arch/arm/include/asm/arch-tegra30/tegra.h b/arch/arm/include/asm/arch-tegra30/tegra.h
index 4ad8b1c..c02c5d8 100644
--- a/arch/arm/include/asm/arch-tegra30/tegra.h
+++ b/arch/arm/include/asm/arch-tegra30/tegra.h
@@ -17,8 +17,6 @@
#ifndef _TEGRA30_H_
#define _TEGRA30_H_
-#define CONFIG_TEGRA30
-
#define NV_PA_SDRAM_BASE 0x80000000 /* 0x80000000 for real T30 */
#include <asm/arch-tegra/tegra.h>