Skip to content

Commit e324654

Browse files
masahir0yarndb
authored andcommitted
ARM: use "depends on" for SoC configs instead of "if" after prompt
Many ARM sub-architectures use prompts followed by "if" conditional, but it is wrong. Please notice the difference between config ARCH_FOO bool "Foo SoCs" if ARCH_MULTI_V7 and config ARCH_FOO bool "Foo SoCs" depends on ARCH_MULTI_V7 These two are *not* equivalent! In the former statement, it is not ARCH_FOO, but its prompt that depends on ARCH_MULTI_V7. So, it is completely valid that ARCH_FOO is selected by another, but ARCH_MULTI_V7 is still disabled. As it is not unmet dependency, Kconfig never warns. This is probably not what you want. The former should be used only when you need to do so, and you really understand what you are doing. (In most cases, it should be wrong!) For enabling/disabling sub-architectures, the latter is always correct. As a good side effect, this commit fixes some entries over 80 columns (mach-imx, mach-integrator, mach-mbevu). [Arnd: I note that there is not really a bug here, according to the discussion that followed, but I can see value in being consistent and in making the lines shorter] Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Maxime Ripard <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Acked-by: Heiko Stuebner <[email protected]> Acked-by: Patrice Chotard <[email protected]> Acked-by: Liviu Dudau <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Acked-by: Jun Nie <[email protected]> Acked-by: Matthias Brugger <[email protected]> Acked-by: Simon Horman <[email protected]> Acked-by: Gregory CLEMENT <[email protected]> Acked-by: Shawn Guo <[email protected]> Acked-by: Sebastian Hesselbarth <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Krzysztof Halasa <[email protected]> Acked-by: Maxime Coquelin <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 9d2aa8c commit e324654

File tree

32 files changed

+110
-58
lines changed

32 files changed

+110
-58
lines changed

arch/arm/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,8 @@ config ARCH_MULTI_CPU_AUTO
796796
endmenu
797797

798798
config ARCH_VIRT
799-
bool "Dummy Virtual Machine" if ARCH_MULTI_V7
799+
bool "Dummy Virtual Machine"
800+
depends on ARCH_MULTI_V7
800801
select ARM_AMBA
801802
select ARM_GIC
802803
select ARM_GIC_V3

arch/arm/mach-alpine/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
config ARCH_ALPINE
2-
bool "Annapurna Labs Alpine platform" if ARCH_MULTI_V7
2+
bool "Annapurna Labs Alpine platform"
3+
depends on ARCH_MULTI_V7
34
select ARM_AMBA
45
select ARM_GIC
56
select GENERIC_IRQ_CHIP

arch/arm/mach-at91/Kconfig

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ menuconfig ARCH_AT91
99

1010
if ARCH_AT91
1111
config SOC_SAMA5D2
12-
bool "SAMA5D2 family" if ARCH_MULTI_V7
12+
bool "SAMA5D2 family"
13+
depends on ARCH_MULTI_V7
1314
select SOC_SAMA5
1415
select CACHE_L2X0
1516
select HAVE_FB_ATMEL
@@ -21,7 +22,8 @@ config SOC_SAMA5D2
2122
Select this if ou are using one of Atmel's SAMA5D2 family SoC.
2223

2324
config SOC_SAMA5D3
24-
bool "SAMA5D3 family" if ARCH_MULTI_V7
25+
bool "SAMA5D3 family"
26+
depends on ARCH_MULTI_V7
2527
select SOC_SAMA5
2628
select HAVE_FB_ATMEL
2729
select HAVE_AT91_UTMI
@@ -32,7 +34,8 @@ config SOC_SAMA5D3
3234
This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36.
3335

3436
config SOC_SAMA5D4
35-
bool "SAMA5D4 family" if ARCH_MULTI_V7
37+
bool "SAMA5D4 family"
38+
depends on ARCH_MULTI_V7
3639
select SOC_SAMA5
3740
select CACHE_L2X0
3841
select HAVE_FB_ATMEL
@@ -44,7 +47,8 @@ config SOC_SAMA5D4
4447
Select this if you are using one of Atmel's SAMA5D4 family SoC.
4548

4649
config SOC_AT91RM9200
47-
bool "AT91RM9200" if ARCH_MULTI_V4T
50+
bool "AT91RM9200"
51+
depends on ARCH_MULTI_V4T
4852
select ATMEL_AIC_IRQ
4953
select ATMEL_ST
5054
select CPU_ARM920T
@@ -56,7 +60,8 @@ config SOC_AT91RM9200
5660
Select this if you are using Atmel's AT91RM9200 SoC.
5761

5862
config SOC_AT91SAM9
59-
bool "AT91SAM9" if ARCH_MULTI_V5
63+
bool "AT91SAM9"
64+
depends on ARCH_MULTI_V5
6065
select ATMEL_AIC_IRQ
6166
select ATMEL_SDRAMC
6267
select CPU_ARM926T

arch/arm/mach-axxia/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
config ARCH_AXXIA
2-
bool "LSI Axxia platforms" if (ARCH_MULTI_V7 && ARM_LPAE)
2+
bool "LSI Axxia platforms"
3+
depends on ARCH_MULTI_V7 && ARM_LPAE
34
select ARCH_DMA_ADDR_T_64BIT
45
select ARM_AMBA
56
select ARM_GIC

arch/arm/mach-bcm/Kconfig

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
menuconfig ARCH_BCM
2-
bool "Broadcom SoC Support" if ARCH_MULTI_V6_V7
2+
bool "Broadcom SoC Support"
3+
depends on ARCH_MULTI_V6_V7
34
help
45
This enables support for Broadcom ARM based SoC chips
56

@@ -27,7 +28,8 @@ config ARCH_BCM_IPROC
2728
Currently supported SoCs are Cygnus.
2829

2930
config ARCH_BCM_CYGNUS
30-
bool "Broadcom Cygnus Support" if ARCH_MULTI_V7
31+
bool "Broadcom Cygnus Support"
32+
depends on ARCH_MULTI_V7
3133
select ARCH_BCM_IPROC
3234
help
3335
Enable support for the Cygnus family,
@@ -36,7 +38,8 @@ config ARCH_BCM_CYGNUS
3638
BCM58300, BCM58302, BCM58303, BCM58305.
3739

3840
config ARCH_BCM_NSP
39-
bool "Broadcom Northstar Plus SoC Support" if ARCH_MULTI_V7
41+
bool "Broadcom Northstar Plus SoC Support"
42+
depends on ARCH_MULTI_V7
4043
select ARCH_BCM_IPROC
4144
select ARM_ERRATA_754322
4245
select ARM_ERRATA_775420
@@ -50,7 +53,8 @@ config ARCH_BCM_NSP
5053
NAND flash, SATA and several other IO controllers.
5154

5255
config ARCH_BCM_5301X
53-
bool "Broadcom BCM470X / BCM5301X ARM SoC" if ARCH_MULTI_V7
56+
bool "Broadcom BCM470X / BCM5301X ARM SoC"
57+
depends on ARCH_MULTI_V7
5458
select ARCH_BCM_IPROC
5559
help
5660
Support for Broadcom BCM470X and BCM5301X SoCs with ARM CPU cores.
@@ -82,7 +86,8 @@ config ARCH_BCM_MOBILE
8286
This enables support for systems based on Broadcom mobile SoCs.
8387

8488
config ARCH_BCM_281XX
85-
bool "Broadcom BCM281XX SoC family" if ARCH_MULTI_V7
89+
bool "Broadcom BCM281XX SoC family"
90+
depends on ARCH_MULTI_V7
8691
select ARCH_BCM_MOBILE
8792
select HAVE_SMP
8893
help
@@ -91,7 +96,8 @@ config ARCH_BCM_281XX
9196
variants.
9297

9398
config ARCH_BCM_21664
94-
bool "Broadcom BCM21664 SoC family" if ARCH_MULTI_V7
99+
bool "Broadcom BCM21664 SoC family"
100+
depends on ARCH_MULTI_V7
95101
select ARCH_BCM_MOBILE
96102
select HAVE_SMP
97103
help
@@ -122,7 +128,8 @@ config ARCH_BCM_MOBILE_SMP
122128
comment "Other Architectures"
123129

124130
config ARCH_BCM2835
125-
bool "Broadcom BCM2835 family" if ARCH_MULTI_V6
131+
bool "Broadcom BCM2835 family"
132+
depends on ARCH_MULTI_V6
126133
select ARCH_REQUIRE_GPIOLIB
127134
select ARM_AMBA
128135
select ARM_ERRATA_411920
@@ -135,7 +142,8 @@ config ARCH_BCM2835
135142
used in the Raspberry Pi and Roku 2 devices.
136143

137144
config ARCH_BCM_63XX
138-
bool "Broadcom BCM63xx DSL SoC" if ARCH_MULTI_V7
145+
bool "Broadcom BCM63xx DSL SoC"
146+
depends on ARCH_MULTI_V7
139147
depends on MMU
140148
select ARM_ERRATA_754322
141149
select ARM_ERRATA_764369 if SMP
@@ -152,7 +160,8 @@ config ARCH_BCM_63XX
152160
the BCM63138 variant.
153161

154162
config ARCH_BRCMSTB
155-
bool "Broadcom BCM7XXX based boards" if ARCH_MULTI_V7
163+
bool "Broadcom BCM7XXX based boards"
164+
depends on ARCH_MULTI_V7
156165
select ARM_GIC
157166
select ARM_ERRATA_798181 if SMP
158167
select HAVE_ARM_ARCH_TIMER

arch/arm/mach-berlin/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
menuconfig ARCH_BERLIN
2-
bool "Marvell Berlin SoCs" if ARCH_MULTI_V7
2+
bool "Marvell Berlin SoCs"
3+
depends on ARCH_MULTI_V7
34
select ARCH_HAS_RESET_CONTROLLER
45
select ARCH_REQUIRE_GPIOLIB
56
select ARM_GIC

arch/arm/mach-cns3xxx/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
menuconfig ARCH_CNS3XXX
2-
bool "Cavium Networks CNS3XXX family" if ARCH_MULTI_V6
2+
bool "Cavium Networks CNS3XXX family"
3+
depends on ARCH_MULTI_V6
34
select ARM_GIC
45
select PCI_DOMAINS if PCI
56
help

arch/arm/mach-exynos/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
# Configuration options for the EXYNOS4
99

1010
menuconfig ARCH_EXYNOS
11-
bool "Samsung EXYNOS" if ARCH_MULTI_V7
11+
bool "Samsung EXYNOS"
12+
depends on ARCH_MULTI_V7
1213
select ARCH_HAS_BANDGAP
1314
select ARCH_HAS_HOLES_MEMORYMODEL
1415
select ARCH_REQUIRE_GPIOLIB

arch/arm/mach-highbank/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
config ARCH_HIGHBANK
2-
bool "Calxeda ECX-1000/2000 (Highbank/Midway)" if ARCH_MULTI_V7
2+
bool "Calxeda ECX-1000/2000 (Highbank/Midway)"
3+
depends on ARCH_MULTI_V7
34
select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
45
select ARCH_HAS_HOLES_MEMORYMODEL
56
select ARCH_SUPPORTS_BIG_ENDIAN

arch/arm/mach-hisi/Kconfig

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ if ARCH_HISI
1313
menu "Hisilicon platform type"
1414

1515
config ARCH_HI3xxx
16-
bool "Hisilicon Hi36xx family" if ARCH_MULTI_V7
16+
bool "Hisilicon Hi36xx family"
17+
depends on ARCH_MULTI_V7
1718
select CACHE_L2X0
1819
select HAVE_ARM_SCU if SMP
1920
select HAVE_ARM_TWD if SMP
@@ -23,15 +24,17 @@ config ARCH_HI3xxx
2324
Support for Hisilicon Hi36xx SoC family
2425

2526
config ARCH_HIP01
26-
bool "Hisilicon HIP01 family" if ARCH_MULTI_V7
27+
bool "Hisilicon HIP01 family"
28+
depends on ARCH_MULTI_V7
2729
select HAVE_ARM_SCU if SMP
2830
select HAVE_ARM_TWD if SMP
2931
select ARM_GLOBAL_TIMER
3032
help
3133
Support for Hisilicon HIP01 SoC family
3234

3335
config ARCH_HIP04
34-
bool "Hisilicon HiP04 Cortex A15 family" if ARCH_MULTI_V7
36+
bool "Hisilicon HiP04 Cortex A15 family"
37+
depends on ARCH_MULTI_V7
3538
select ARM_ERRATA_798181 if SMP
3639
select HAVE_ARM_ARCH_TIMER
3740
select MCPM if SMP
@@ -40,7 +43,8 @@ config ARCH_HIP04
4043
Support for Hisilicon HiP04 SoC family
4144

4245
config ARCH_HIX5HD2
43-
bool "Hisilicon X5HD2 family" if ARCH_MULTI_V7
46+
bool "Hisilicon X5HD2 family"
47+
depends on ARCH_MULTI_V7
4448
select CACHE_L2X0
4549
select HAVE_ARM_SCU if SMP
4650
select HAVE_ARM_TWD if SMP

arch/arm/mach-imx/Kconfig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
menuconfig ARCH_MXC
2-
bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M
2+
bool "Freescale i.MX family"
3+
depends on ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M
34
select ARCH_REQUIRE_GPIOLIB
45
select ARM_CPU_SUSPEND if PM
56
select CLKSRC_IMX_GPT
@@ -596,7 +597,8 @@ choice
596597
default VF_USE_ARM_GLOBAL_TIMER
597598

598599
config VF_USE_ARM_GLOBAL_TIMER
599-
bool "Use ARM Global Timer" if ARCH_MULTI_V7
600+
bool "Use ARM Global Timer"
601+
depends on ARCH_MULTI_V7
600602
select ARM_GLOBAL_TIMER
601603
select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
602604
help

arch/arm/mach-integrator/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
config ARCH_INTEGRATOR
2-
bool "ARM Ltd. Integrator family" if (ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V6)
2+
bool "ARM Ltd. Integrator family"
3+
depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V6
34
select ARM_AMBA
45
select ARM_PATCH_PHYS_VIRT if MMU
56
select AUTO_ZRELADDR

arch/arm/mach-mediatek/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
menuconfig ARCH_MEDIATEK
2-
bool "Mediatek MT65xx & MT81xx SoC" if ARCH_MULTI_V7
2+
bool "Mediatek MT65xx & MT81xx SoC"
3+
depends on ARCH_MULTI_V7
34
select ARM_GIC
45
select PINCTRL
56
select MTK_TIMER

arch/arm/mach-meson/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
menuconfig ARCH_MESON
2-
bool "Amlogic Meson SoCs" if ARCH_MULTI_V7
2+
bool "Amlogic Meson SoCs"
3+
depends on ARCH_MULTI_V7
34
select ARCH_REQUIRE_GPIOLIB
45
select GENERIC_IRQ_CHIP
56
select ARM_GIC

arch/arm/mach-moxart/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
menuconfig ARCH_MOXART
2-
bool "MOXA ART SoC" if ARCH_MULTI_V4
2+
bool "MOXA ART SoC"
3+
depends on ARCH_MULTI_V4
34
select CPU_FA526
45
select ARM_DMA_MEM_BUFFERABLE
56
select CLKSRC_MMIO

arch/arm/mach-mvebu/Kconfig

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
menuconfig ARCH_MVEBU
2-
bool "Marvell Engineering Business Unit (MVEBU) SoCs" if (ARCH_MULTI_V7 || ARCH_MULTI_V5)
2+
bool "Marvell Engineering Business Unit (MVEBU) SoCs"
3+
depends on ARCH_MULTI_V7 || ARCH_MULTI_V5
34
select ARCH_SUPPORTS_BIG_ENDIAN
45
select CLKSRC_MMIO
56
select GENERIC_IRQ_CHIP
@@ -25,7 +26,8 @@ config MACH_MVEBU_V7
2526
select MACH_MVEBU_ANY
2627

2728
config MACH_ARMADA_370
28-
bool "Marvell Armada 370 boards" if ARCH_MULTI_V7
29+
bool "Marvell Armada 370 boards"
30+
depends on ARCH_MULTI_V7
2931
select ARMADA_370_CLK
3032
select CPU_PJ4B
3133
select MACH_MVEBU_V7
@@ -35,7 +37,8 @@ config MACH_ARMADA_370
3537
on the Marvell Armada 370 SoC with device tree.
3638

3739
config MACH_ARMADA_375
38-
bool "Marvell Armada 375 boards" if ARCH_MULTI_V7
40+
bool "Marvell Armada 375 boards"
41+
depends on ARCH_MULTI_V7
3942
select ARM_ERRATA_720789
4043
select ARM_ERRATA_753970
4144
select ARM_GIC
@@ -50,7 +53,8 @@ config MACH_ARMADA_375
5053
on the Marvell Armada 375 SoC with device tree.
5154

5255
config MACH_ARMADA_38X
53-
bool "Marvell Armada 380/385 boards" if ARCH_MULTI_V7
56+
bool "Marvell Armada 380/385 boards"
57+
depends on ARCH_MULTI_V7
5458
select ARM_ERRATA_720789
5559
select ARM_ERRATA_753970
5660
select ARM_GIC
@@ -65,7 +69,8 @@ config MACH_ARMADA_38X
6569
on the Marvell Armada 380/385 SoC with device tree.
6670

6771
config MACH_ARMADA_39X
68-
bool "Marvell Armada 39x boards" if ARCH_MULTI_V7
72+
bool "Marvell Armada 39x boards"
73+
depends on ARCH_MULTI_V7
6974
select ARM_GIC
7075
select ARMADA_39X_CLK
7176
select CACHE_L2X0
@@ -79,7 +84,8 @@ config MACH_ARMADA_39X
7984
on the Marvell Armada 39x SoC with device tree.
8085

8186
config MACH_ARMADA_XP
82-
bool "Marvell Armada XP boards" if ARCH_MULTI_V7
87+
bool "Marvell Armada XP boards"
88+
depends on ARCH_MULTI_V7
8389
select ARMADA_XP_CLK
8490
select CPU_PJ4B
8591
select MACH_MVEBU_V7
@@ -89,7 +95,8 @@ config MACH_ARMADA_XP
8995
on the Marvell Armada XP SoC with device tree.
9096

9197
config MACH_DOVE
92-
bool "Marvell Dove boards" if ARCH_MULTI_V7
98+
bool "Marvell Dove boards"
99+
depends on ARCH_MULTI_V7
93100
select CACHE_L2X0
94101
select CPU_PJ4
95102
select DOVE_CLK
@@ -103,7 +110,8 @@ config MACH_DOVE
103110
Marvell Dove using flattened device tree.
104111

105112
config MACH_KIRKWOOD
106-
bool "Marvell Kirkwood boards" if ARCH_MULTI_V5
113+
bool "Marvell Kirkwood boards"
114+
depends on ARCH_MULTI_V5
107115
select ARCH_REQUIRE_GPIOLIB
108116
select CPU_FEROCEON
109117
select KIRKWOOD_CLK

arch/arm/mach-picoxcell/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
config ARCH_PICOXCELL
2-
bool "Picochip PicoXcell" if ARCH_MULTI_V6
2+
bool "Picochip PicoXcell"
3+
depends on ARCH_MULTI_V6
34
select ARCH_REQUIRE_GPIOLIB
45
select ARM_VIC
56
select DW_APB_TIMER_OF

arch/arm/mach-prima2/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
menuconfig ARCH_SIRF
2-
bool "CSR SiRF" if ARCH_MULTI_V7
2+
bool "CSR SiRF"
3+
depends on ARCH_MULTI_V7
34
select ARCH_HAS_RESET_CONTROLLER
45
select ARCH_REQUIRE_GPIOLIB
56
select GENERIC_IRQ_CHIP

arch/arm/mach-qcom/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
menuconfig ARCH_QCOM
2-
bool "Qualcomm Support" if ARCH_MULTI_V7
2+
bool "Qualcomm Support"
3+
depends on ARCH_MULTI_V7
34
select ARCH_SUPPORTS_BIG_ENDIAN
45
select ARM_GIC
56
select ARM_AMBA

arch/arm/mach-rockchip/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
config ARCH_ROCKCHIP
2-
bool "Rockchip RK2928 and RK3xxx SOCs" if ARCH_MULTI_V7
2+
bool "Rockchip RK2928 and RK3xxx SOCs"
3+
depends on ARCH_MULTI_V7
34
select PINCTRL
45
select PINCTRL_ROCKCHIP
56
select ARCH_HAS_RESET_CONTROLLER

0 commit comments

Comments
 (0)