Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3246542 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Arnd Bergmann
Browse files

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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
Acked-by: default avatarPatrice Chotard <patrice.chotard@st.com>
Acked-by: default avatarLiviu Dudau <Liviu.Dudau@arm.com>
Acked-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: default avatarJun Nie <jun.nie@linaro.org>
Acked-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
Acked-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Acked-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: default avatarShawn Guo <shawnguo@kernel.org>
Acked-by: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: default avatarThierry Reding <treding@nvidia.com>
Acked-by: default avatarKrzysztof Halasa <khc@piap.pl>
Acked-by: default avatarMaxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 9d2aa8c7
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -796,7 +796,8 @@ config ARCH_MULTI_CPU_AUTO
endmenu
endmenu


config ARCH_VIRT
config ARCH_VIRT
	bool "Dummy Virtual Machine" if ARCH_MULTI_V7
	bool "Dummy Virtual Machine"
	depends on ARCH_MULTI_V7
	select ARM_AMBA
	select ARM_AMBA
	select ARM_GIC
	select ARM_GIC
	select ARM_GIC_V3
	select ARM_GIC_V3
+2 −1
Original line number Original line Diff line number Diff line
config ARCH_ALPINE
config ARCH_ALPINE
	bool "Annapurna Labs Alpine platform" if ARCH_MULTI_V7
	bool "Annapurna Labs Alpine platform"
	depends on ARCH_MULTI_V7
	select ARM_AMBA
	select ARM_AMBA
	select ARM_GIC
	select ARM_GIC
	select GENERIC_IRQ_CHIP
	select GENERIC_IRQ_CHIP
+10 −5
Original line number Original line Diff line number Diff line
@@ -9,7 +9,8 @@ menuconfig ARCH_AT91


if ARCH_AT91
if ARCH_AT91
config SOC_SAMA5D2
config SOC_SAMA5D2
	bool "SAMA5D2 family" if ARCH_MULTI_V7
	bool "SAMA5D2 family"
	depends on ARCH_MULTI_V7
	select SOC_SAMA5
	select SOC_SAMA5
	select CACHE_L2X0
	select CACHE_L2X0
	select HAVE_FB_ATMEL
	select HAVE_FB_ATMEL
@@ -21,7 +22,8 @@ config SOC_SAMA5D2
	  Select this if ou are using one of Atmel's SAMA5D2 family SoC.
	  Select this if ou are using one of Atmel's SAMA5D2 family SoC.


config SOC_SAMA5D3
config SOC_SAMA5D3
	bool "SAMA5D3 family" if ARCH_MULTI_V7
	bool "SAMA5D3 family"
	depends on ARCH_MULTI_V7
	select SOC_SAMA5
	select SOC_SAMA5
	select HAVE_FB_ATMEL
	select HAVE_FB_ATMEL
	select HAVE_AT91_UTMI
	select HAVE_AT91_UTMI
@@ -32,7 +34,8 @@ config SOC_SAMA5D3
	  This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36.
	  This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36.


config SOC_SAMA5D4
config SOC_SAMA5D4
	bool "SAMA5D4 family" if ARCH_MULTI_V7
	bool "SAMA5D4 family"
	depends on ARCH_MULTI_V7
	select SOC_SAMA5
	select SOC_SAMA5
	select CACHE_L2X0
	select CACHE_L2X0
	select HAVE_FB_ATMEL
	select HAVE_FB_ATMEL
@@ -44,7 +47,8 @@ config SOC_SAMA5D4
	  Select this if you are using one of Atmel's SAMA5D4 family SoC.
	  Select this if you are using one of Atmel's SAMA5D4 family SoC.


config SOC_AT91RM9200
config SOC_AT91RM9200
	bool "AT91RM9200" if ARCH_MULTI_V4T
	bool "AT91RM9200"
	depends on ARCH_MULTI_V4T
	select ATMEL_AIC_IRQ
	select ATMEL_AIC_IRQ
	select ATMEL_ST
	select ATMEL_ST
	select CPU_ARM920T
	select CPU_ARM920T
@@ -56,7 +60,8 @@ config SOC_AT91RM9200
	  Select this if you are using Atmel's AT91RM9200 SoC.
	  Select this if you are using Atmel's AT91RM9200 SoC.


config SOC_AT91SAM9
config SOC_AT91SAM9
	bool "AT91SAM9" if ARCH_MULTI_V5
	bool "AT91SAM9"
	depends on ARCH_MULTI_V5
	select ATMEL_AIC_IRQ
	select ATMEL_AIC_IRQ
	select ATMEL_SDRAMC
	select ATMEL_SDRAMC
	select CPU_ARM926T
	select CPU_ARM926T
+2 −1
Original line number Original line Diff line number Diff line
config ARCH_AXXIA
config ARCH_AXXIA
	bool "LSI Axxia platforms" if (ARCH_MULTI_V7 && ARM_LPAE)
	bool "LSI Axxia platforms"
	depends on ARCH_MULTI_V7 && ARM_LPAE
	select ARCH_DMA_ADDR_T_64BIT
	select ARCH_DMA_ADDR_T_64BIT
	select ARM_AMBA
	select ARM_AMBA
	select ARM_GIC
	select ARM_GIC
+18 −9
Original line number Original line Diff line number Diff line
menuconfig ARCH_BCM
menuconfig ARCH_BCM
	bool "Broadcom SoC Support" if ARCH_MULTI_V6_V7
	bool "Broadcom SoC Support"
	depends on ARCH_MULTI_V6_V7
	help
	help
	  This enables support for Broadcom ARM based SoC chips
	  This enables support for Broadcom ARM based SoC chips


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


config ARCH_BCM_CYGNUS
config ARCH_BCM_CYGNUS
	bool "Broadcom Cygnus Support" if ARCH_MULTI_V7
	bool "Broadcom Cygnus Support"
	depends on ARCH_MULTI_V7
	select ARCH_BCM_IPROC
	select ARCH_BCM_IPROC
	help
	help
	  Enable support for the Cygnus family,
	  Enable support for the Cygnus family,
@@ -36,7 +38,8 @@ config ARCH_BCM_CYGNUS
	  BCM58300, BCM58302, BCM58303, BCM58305.
	  BCM58300, BCM58302, BCM58303, BCM58305.


config ARCH_BCM_NSP
config ARCH_BCM_NSP
	bool "Broadcom Northstar Plus SoC Support" if ARCH_MULTI_V7
	bool "Broadcom Northstar Plus SoC Support"
	depends on ARCH_MULTI_V7
	select ARCH_BCM_IPROC
	select ARCH_BCM_IPROC
	select ARM_ERRATA_754322
	select ARM_ERRATA_754322
	select ARM_ERRATA_775420
	select ARM_ERRATA_775420
@@ -50,7 +53,8 @@ config ARCH_BCM_NSP
	  NAND flash, SATA and several other IO controllers.
	  NAND flash, SATA and several other IO controllers.


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


config ARCH_BCM_281XX
config ARCH_BCM_281XX
	bool "Broadcom BCM281XX SoC family" if ARCH_MULTI_V7
	bool "Broadcom BCM281XX SoC family"
	depends on ARCH_MULTI_V7
	select ARCH_BCM_MOBILE
	select ARCH_BCM_MOBILE
	select HAVE_SMP
	select HAVE_SMP
	help
	help
@@ -91,7 +96,8 @@ config ARCH_BCM_281XX
	  variants.
	  variants.


config ARCH_BCM_21664
config ARCH_BCM_21664
	bool "Broadcom BCM21664 SoC family" if ARCH_MULTI_V7
	bool "Broadcom BCM21664 SoC family"
	depends on ARCH_MULTI_V7
	select ARCH_BCM_MOBILE
	select ARCH_BCM_MOBILE
	select HAVE_SMP
	select HAVE_SMP
	help
	help
@@ -122,7 +128,8 @@ config ARCH_BCM_MOBILE_SMP
comment "Other Architectures"
comment "Other Architectures"


config ARCH_BCM2835
config ARCH_BCM2835
	bool "Broadcom BCM2835 family" if ARCH_MULTI_V6
	bool "Broadcom BCM2835 family"
	depends on ARCH_MULTI_V6
	select ARCH_REQUIRE_GPIOLIB
	select ARCH_REQUIRE_GPIOLIB
	select ARM_AMBA
	select ARM_AMBA
	select ARM_ERRATA_411920
	select ARM_ERRATA_411920
@@ -135,7 +142,8 @@ config ARCH_BCM2835
	  used in the Raspberry Pi and Roku 2 devices.
	  used in the Raspberry Pi and Roku 2 devices.


config ARCH_BCM_63XX
config ARCH_BCM_63XX
	bool "Broadcom BCM63xx DSL SoC" if ARCH_MULTI_V7
	bool "Broadcom BCM63xx DSL SoC"
	depends on ARCH_MULTI_V7
	depends on MMU
	depends on MMU
	select ARM_ERRATA_754322
	select ARM_ERRATA_754322
	select ARM_ERRATA_764369 if SMP
	select ARM_ERRATA_764369 if SMP
@@ -152,7 +160,8 @@ config ARCH_BCM_63XX
	  the BCM63138 variant.
	  the BCM63138 variant.


config ARCH_BRCMSTB
config ARCH_BRCMSTB
	bool "Broadcom BCM7XXX based boards" if ARCH_MULTI_V7
	bool "Broadcom BCM7XXX based boards"
	depends on ARCH_MULTI_V7
	select ARM_GIC
	select ARM_GIC
	select ARM_ERRATA_798181 if SMP
	select ARM_ERRATA_798181 if SMP
	select HAVE_ARM_ARCH_TIMER
	select HAVE_ARM_ARCH_TIMER
Loading