From abcf2ad5a8b5dfdaad87717ebdf48bc40b3ea56d Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 4 Sep 2018 08:32:07 -0500 Subject: [PATCH] kconfig: move soc selection to ZEPHYR_BASE/soc/ Rather than do that for each architecture, source SoC Kconfigs where the code is maintained, under ZEPHYR_BASE/soc. Signed-off-by: Anas Nashif --- Kconfig.zephyr | 4 ++++ arch/Kconfig | 2 -- arch/arc/Kconfig | 12 ------------ arch/arm/Kconfig | 13 ------------- arch/nios2/Kconfig | 12 ------------ arch/posix/Kconfig | 13 ------------- arch/riscv32/Kconfig | 10 ---------- arch/x86/Kconfig | 12 ------------ arch/xtensa/Kconfig | 12 ------------ soc/Kconfig | 12 ++++++++++++ 10 files changed, 16 insertions(+), 86 deletions(-) create mode 100644 soc/Kconfig diff --git a/Kconfig.zephyr b/Kconfig.zephyr index 942ccb57ca6..c9f1f79c469 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -20,6 +20,10 @@ source "$(BOARD_DIR)/Kconfig.defconfig" source "soc/$(ARCH)/*/Kconfig.defconfig" +source "boards/Kconfig" + +source "soc/Kconfig" + source "arch/Kconfig" source "kernel/Kconfig" diff --git a/arch/Kconfig b/arch/Kconfig index b2f1ebab0df..205e1eea68d 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -11,11 +11,9 @@ # Include these first so that any properties (e.g. defaults) below can be # overriden (by defining symbols in multiple locations) -source "boards/Kconfig" # Note: $ARCH might be a glob pattern source "arch/$(ARCH)/Kconfig" - choice prompt "Architecture" default X86 diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index adc720d83c7..ddd8d7ad187 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -6,21 +6,9 @@ # SPDX-License-Identifier: Apache-2.0 # -choice - prompt "ARC SoC Selection" - depends on ARC - - source "soc/arc/*/Kconfig.soc" -endchoice - - menu "ARC Options" depends on ARC -# Include these first so that any properties (e.g. defaults) below can be -# overriden (by defining symbols in multiple locations) -source "soc/arc/*/Kconfig" - config ARCH default "arc" diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 80f5010a73f..fd803d3dae6 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -6,23 +6,10 @@ # SPDX-License-Identifier: Apache-2.0 # -choice - prompt "ARM SoC Selection" - default SOC_SERIES_KINETIS_K6X - depends on ARM - - source "soc/arm/*/Kconfig.soc" -endchoice menu "ARM Options" depends on ARM -menu "SoC Configuration" -# Include these first so that any properties (e.g. defaults) below can be -# overriden (by defining symbols in multiple locations) -source "soc/arm/*/Kconfig" -endmenu - source "arch/arm/core/Kconfig" config ARCH diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig index 5daa04b3a86..f2fa19c4ff8 100644 --- a/arch/nios2/Kconfig +++ b/arch/nios2/Kconfig @@ -4,21 +4,9 @@ # SPDX-License-Identifier: Apache-2.0 # -choice - prompt "Nios II configuration selection" - depends on NIOS2 - source "soc/nios2/*/Kconfig.soc" -endchoice - menu "Nios II Options" depends on NIOS2 -# Include these first so that any properties (e.g. defaults) below can be -# overriden (by defining symbols in multiple locations) -# -# (No SoC-specific Kconfig files as of writing, hence the optional source.) -osource "soc/nios2/*/Kconfig" - config ARCH string default "nios2" diff --git a/arch/posix/Kconfig b/arch/posix/Kconfig index c0789084423..4ad21ff8f31 100644 --- a/arch/posix/Kconfig +++ b/arch/posix/Kconfig @@ -6,22 +6,9 @@ # SPDX-License-Identifier: Apache-2.0 # -choice - prompt "POSIX Configuration Selection" - depends on ARCH_POSIX - - source "soc/posix/*/Kconfig.soc" -endchoice - menu "POSIX (native) Options" depends on ARCH_POSIX -# Include these first so that any properties (e.g. defaults) below can be -# overriden (by defining symbols in multiple locations) -# -# (No SoC-specific Kconfig files as of writing, hence the optional source.) -osource "soc/posix/*/Kconfig" - config ARCH default "posix" diff --git a/arch/riscv32/Kconfig b/arch/riscv32/Kconfig index ff06f848d67..20b3cc50854 100644 --- a/arch/riscv32/Kconfig +++ b/arch/riscv32/Kconfig @@ -4,19 +4,9 @@ # SPDX-License-Identifier: Apache-2.0 # -choice - prompt "RISCV32 configuration selection" - depends on RISCV32 - source "soc/riscv32/*/Kconfig.soc" -endchoice - menu "RISCV32 Options" depends on RISCV32 -# Include these first so that any properties (e.g. defaults) below can be -# overriden (by defining symbols in multiple locations) -source "soc/riscv32/*/Kconfig" - config ARCH string default "riscv32" diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e1ce6fff500..8e3224812b2 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -5,21 +5,9 @@ # # SPDX-License-Identifier: Apache-2.0 # - -choice - prompt "x86 SoC Selection" - depends on X86 - - source "soc/x86/*/Kconfig.soc" -endchoice - menu "X86 Architecture Options" depends on X86 -# Include these first so that any properties (e.g. defaults) below can be -# overriden (by defining symbols in multiple locations) -source "soc/x86/*/Kconfig" - config ARCH default "x86" diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 462581a6ee1..696169a90e6 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -3,23 +3,11 @@ # Copyright (c) 2016 Cadence Design Systems, Inc. # SPDX-License-Identifier: Apache-2.0 -choice - prompt "XTENSA core Selection" - depends on XTENSA - source "soc/xtensa/*/Kconfig.soc" -endchoice - menu "XTENSA Options" depends on XTENSA menu "Specific core configuration" -# Include these first so that any properties (e.g. defaults) below can be -# overriden (by defining symbols in multiple locations) -# -# (No SoC-specific Kconfig files as of writing, hence the optional source.) -osource "soc/xtensa/*/Kconfig" - config IRQ_OFFLOAD_INTNUM int "IRQ offload SW interrupt index" help diff --git a/soc/Kconfig b/soc/Kconfig new file mode 100644 index 00000000000..6e167f10c7b --- /dev/null +++ b/soc/Kconfig @@ -0,0 +1,12 @@ + +choice + prompt "SoC/CPU/Configuration Selection" + +source "soc/$ENV_VAR_ARCH/*/Kconfig.soc" + +endchoice + +menu "Hardware Configuration" +osource "soc/$ENV_VAR_ARCH/*/Kconfig" + +endmenu