aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Martin <dave.martin@linaro.org>2011-11-29 10:56:19 -0500
committerDave Martin <dave.martin@linaro.org>2011-12-19 08:46:11 -0500
commitce5ea9f3767e8589521319cae2eb6e05c52bd056 (patch)
tree29e08e74c3ecd3a6b8a4875d3e631b17ff456fef
parentcaca6a03d365883564885f2c1da3e88dcf65d139 (diff)
ARM: l2x0/pl310: Refactor Kconfig to be more maintainable
Making CACHE_L2X0 depend on (huge list of MACH_ and ARCH_ configs) is bothersome to maintain and likely to lead to merge conflicts. This patch moves the knowledge of which platforms have a L2x0 or PL310 cache controller to the individual machines. To enable this, a new MIGHT_HAVE_CACHE_L2X0 config option is introduced to allow machines to indicate that they may have such a cache controller independently of each other. Boards/SoCs which cannot reliably operate without the L2 cache controller support will need to select CACHE_L2X0 directly from their own Kconfigs instead. This applies to some TrustZone-enabled boards where Linux runs in the Normal World, for example. Signed-off-by: Dave Martin <dave.martin@linaro.org> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> (for cns3xxx) Acked-by: Tony Lindgren <tony@atomide.com> (for omap) Acked-by: Shawn Guo <shawn.guo@linaro.org> (for imx) Acked-by: Kukjin Kim <kgene.kim@samsung.com> (for exynos) Acked-by: Sascha Hauer <s.hauer@pengutronix.de> (for imx) Acked-by: Olof Johansson <olof@lixom.net> (for tegra)
-rw-r--r--arch/arm/Kconfig8
-rw-r--r--arch/arm/mach-exynos/Kconfig1
-rw-r--r--arch/arm/mach-omap2/Kconfig1
-rw-r--r--arch/arm/mach-realview/Kconfig5
-rw-r--r--arch/arm/mach-vexpress/Kconfig1
-rw-r--r--arch/arm/mm/Kconfig23
-rw-r--r--arch/arm/plat-mxc/Kconfig1
7 files changed, 33 insertions, 7 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 44789eff983f..16a4b9e689be 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -344,6 +344,7 @@ config ARCH_HIGHBANK
344 select CPU_V7 344 select CPU_V7
345 select GENERIC_CLOCKEVENTS 345 select GENERIC_CLOCKEVENTS
346 select HAVE_ARM_SCU 346 select HAVE_ARM_SCU
347 select MIGHT_HAVE_CACHE_L2X0
347 select USE_OF 348 select USE_OF
348 help 349 help
349 Support for the Calxeda Highbank SoC based boards. 350 Support for the Calxeda Highbank SoC based boards.
@@ -361,6 +362,7 @@ config ARCH_CNS3XXX
361 select CPU_V6K 362 select CPU_V6K
362 select GENERIC_CLOCKEVENTS 363 select GENERIC_CLOCKEVENTS
363 select ARM_GIC 364 select ARM_GIC
365 select MIGHT_HAVE_CACHE_L2X0
364 select MIGHT_HAVE_PCI 366 select MIGHT_HAVE_PCI
365 select PCI_DOMAINS if PCI 367 select PCI_DOMAINS if PCI
366 help 368 help
@@ -381,6 +383,7 @@ config ARCH_PRIMA2
381 select GENERIC_CLOCKEVENTS 383 select GENERIC_CLOCKEVENTS
382 select CLKDEV_LOOKUP 384 select CLKDEV_LOOKUP
383 select GENERIC_IRQ_CHIP 385 select GENERIC_IRQ_CHIP
386 select MIGHT_HAVE_CACHE_L2X0
384 select USE_OF 387 select USE_OF
385 select ZONE_DMA 388 select ZONE_DMA
386 help 389 help
@@ -633,6 +636,7 @@ config ARCH_TEGRA
633 select GENERIC_GPIO 636 select GENERIC_GPIO
634 select HAVE_CLK 637 select HAVE_CLK
635 select HAVE_SCHED_CLOCK 638 select HAVE_SCHED_CLOCK
639 select MIGHT_HAVE_CACHE_L2X0
636 select ARCH_HAS_CPUFREQ 640 select ARCH_HAS_CPUFREQ
637 help 641 help
638 This enables support for NVIDIA Tegra based systems (Tegra APX, 642 This enables support for NVIDIA Tegra based systems (Tegra APX,
@@ -703,6 +707,7 @@ config ARCH_SHMOBILE
703 select CLKDEV_LOOKUP 707 select CLKDEV_LOOKUP
704 select HAVE_MACH_CLKDEV 708 select HAVE_MACH_CLKDEV
705 select GENERIC_CLOCKEVENTS 709 select GENERIC_CLOCKEVENTS
710 select MIGHT_HAVE_CACHE_L2X0
706 select NO_IOPORT 711 select NO_IOPORT
707 select SPARSE_IRQ 712 select SPARSE_IRQ
708 select MULTI_IRQ_HANDLER 713 select MULTI_IRQ_HANDLER
@@ -904,6 +909,7 @@ config ARCH_U8500
904 select CLKDEV_LOOKUP 909 select CLKDEV_LOOKUP
905 select ARCH_REQUIRE_GPIOLIB 910 select ARCH_REQUIRE_GPIOLIB
906 select ARCH_HAS_CPUFREQ 911 select ARCH_HAS_CPUFREQ
912 select MIGHT_HAVE_CACHE_L2X0
907 help 913 help
908 Support for ST-Ericsson's Ux500 architecture 914 Support for ST-Ericsson's Ux500 architecture
909 915
@@ -914,6 +920,7 @@ config ARCH_NOMADIK
914 select CPU_ARM926T 920 select CPU_ARM926T
915 select CLKDEV_LOOKUP 921 select CLKDEV_LOOKUP
916 select GENERIC_CLOCKEVENTS 922 select GENERIC_CLOCKEVENTS
923 select MIGHT_HAVE_CACHE_L2X0
917 select ARCH_REQUIRE_GPIOLIB 924 select ARCH_REQUIRE_GPIOLIB
918 help 925 help
919 Support for the Nomadik platform by ST-Ericsson 926 Support for the Nomadik platform by ST-Ericsson
@@ -973,6 +980,7 @@ config ARCH_ZYNQ
973 select ARM_GIC 980 select ARM_GIC
974 select ARM_AMBA 981 select ARM_AMBA
975 select ICST 982 select ICST
983 select MIGHT_HAVE_CACHE_L2X0
976 select USE_OF 984 select USE_OF
977 help 985 help
978 Support for Xilinx Zynq ARM Cortex A9 Platform 986 Support for Xilinx Zynq ARM Cortex A9 Platform
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 724ec0f3560d..7f2347bd6ccc 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -17,6 +17,7 @@ choice
17 17
18config ARCH_EXYNOS4 18config ARCH_EXYNOS4
19 bool "SAMSUNG EXYNOS4" 19 bool "SAMSUNG EXYNOS4"
20 select MIGHT_HAVE_CACHE_L2X0
20 help 21 help
21 Samsung EXYNOS4 SoCs based systems 22 Samsung EXYNOS4 SoCs based systems
22 23
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 503414718905..c8415784e60c 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -44,6 +44,7 @@ config ARCH_OMAP4
44 select CPU_V7 44 select CPU_V7
45 select ARM_GIC 45 select ARM_GIC
46 select LOCAL_TIMERS if SMP 46 select LOCAL_TIMERS if SMP
47 select MIGHT_HAVE_CACHE_L2X0
47 select PL310_ERRATA_588369 48 select PL310_ERRATA_588369
48 select PL310_ERRATA_727915 49 select PL310_ERRATA_727915
49 select ARM_ERRATA_720789 50 select ARM_ERRATA_720789
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
index dba6d0c1fc17..3dd620f8dd9b 100644
--- a/arch/arm/mach-realview/Kconfig
+++ b/arch/arm/mach-realview/Kconfig
@@ -12,6 +12,7 @@ config REALVIEW_EB_A9MP
12 bool "Support Multicore Cortex-A9 Tile" 12 bool "Support Multicore Cortex-A9 Tile"
13 depends on MACH_REALVIEW_EB 13 depends on MACH_REALVIEW_EB
14 select CPU_V7 14 select CPU_V7
15 select MIGHT_HAVE_CACHE_L2X0
15 help 16 help
16 Enable support for the Cortex-A9MPCore tile fitted to the 17 Enable support for the Cortex-A9MPCore tile fitted to the
17 Realview(R) Emulation Baseboard platform. 18 Realview(R) Emulation Baseboard platform.
@@ -21,6 +22,7 @@ config REALVIEW_EB_ARM11MP
21 depends on MACH_REALVIEW_EB 22 depends on MACH_REALVIEW_EB
22 select CPU_V6K 23 select CPU_V6K
23 select ARCH_HAS_BARRIERS if SMP 24 select ARCH_HAS_BARRIERS if SMP
25 select MIGHT_HAVE_CACHE_L2X0
24 help 26 help
25 Enable support for the ARM11MPCore tile fitted to the Realview(R) 27 Enable support for the ARM11MPCore tile fitted to the Realview(R)
26 Emulation Baseboard platform. 28 Emulation Baseboard platform.
@@ -39,6 +41,7 @@ config MACH_REALVIEW_PB11MP
39 select CPU_V6K 41 select CPU_V6K
40 select ARM_GIC 42 select ARM_GIC
41 select HAVE_PATA_PLATFORM 43 select HAVE_PATA_PLATFORM
44 select MIGHT_HAVE_CACHE_L2X0
42 select ARCH_HAS_BARRIERS if SMP 45 select ARCH_HAS_BARRIERS if SMP
43 help 46 help
44 Include support for the ARM(R) RealView(R) Platform Baseboard for 47 Include support for the ARM(R) RealView(R) Platform Baseboard for
@@ -51,6 +54,7 @@ config MACH_REALVIEW_PB1176
51 select CPU_V6 54 select CPU_V6
52 select ARM_GIC 55 select ARM_GIC
53 select HAVE_TCM 56 select HAVE_TCM
57 select MIGHT_HAVE_CACHE_L2X0
54 help 58 help
55 Include support for the ARM(R) RealView(R) Platform Baseboard for 59 Include support for the ARM(R) RealView(R) Platform Baseboard for
56 ARM1176JZF-S. 60 ARM1176JZF-S.
@@ -78,6 +82,7 @@ config MACH_REALVIEW_PBX
78 bool "Support RealView(R) Platform Baseboard Explore" 82 bool "Support RealView(R) Platform Baseboard Explore"
79 select ARM_GIC 83 select ARM_GIC
80 select HAVE_PATA_PLATFORM 84 select HAVE_PATA_PLATFORM
85 select MIGHT_HAVE_CACHE_L2X0
81 select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET 86 select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET
82 select ZONE_DMA if SPARSEMEM 87 select ZONE_DMA if SPARSEMEM
83 help 88 help
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 931148487f0b..a8aefc8a6f24 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -8,5 +8,6 @@ config ARCH_VEXPRESS_CA9X4
8 select ARM_ERRATA_720789 8 select ARM_ERRATA_720789
9 select ARM_ERRATA_751472 9 select ARM_ERRATA_751472
10 select ARM_ERRATA_753970 10 select ARM_ERRATA_753970
11 select MIGHT_HAVE_CACHE_L2X0
11 12
12endmenu 13endmenu
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 67f75a0b66d6..acb1c36adadd 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -816,14 +816,23 @@ config CACHE_FEROCEON_L2_WRITETHROUGH
816 Say Y here to use the Feroceon L2 cache in writethrough mode. 816 Say Y here to use the Feroceon L2 cache in writethrough mode.
817 Unless you specifically require this, say N for writeback mode. 817 Unless you specifically require this, say N for writeback mode.
818 818
819config MIGHT_HAVE_CACHE_L2X0
820 bool
821 help
822 This option should be selected by machines which have a L2x0
823 or PL310 cache controller, but where its use is optional.
824
825 The only effect of this option is to make CACHE_L2X0 and
826 related options available to the user for configuration.
827
828 Boards or SoCs which always require the cache controller
829 support to be present should select CACHE_L2X0 directly
830 instead of this option, thus preventing the user from
831 inadvertently configuring a broken kernel.
832
819config CACHE_L2X0 833config CACHE_L2X0
820 bool "Enable the L2x0 outer cache controller" 834 bool "Enable the L2x0 outer cache controller" if MIGHT_HAVE_CACHE_L2X0
821 depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \ 835 default MIGHT_HAVE_CACHE_L2X0
822 REALVIEW_EB_A9MP || ARCH_IMX_V6_V7 || MACH_REALVIEW_PBX || \
823 ARCH_NOMADIK || ARCH_OMAP4 || ARCH_EXYNOS4 || ARCH_TEGRA || \
824 ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || ARCH_SHMOBILE || \
825 ARCH_PRIMA2 || ARCH_ZYNQ || ARCH_CNS3XXX || ARCH_HIGHBANK
826 default y
827 select OUTER_CACHE 836 select OUTER_CACHE
828 select OUTER_CACHE_SYNC 837 select OUTER_CACHE_SYNC
829 help 838 help
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig
index b3a1f2b3ada3..b30708e28c1d 100644
--- a/arch/arm/plat-mxc/Kconfig
+++ b/arch/arm/plat-mxc/Kconfig
@@ -20,6 +20,7 @@ config ARCH_IMX_V6_V7
20 bool "i.MX3, i.MX6" 20 bool "i.MX3, i.MX6"
21 select AUTO_ZRELADDR if !ZBOOT_ROM 21 select AUTO_ZRELADDR if !ZBOOT_ROM
22 select ARM_PATCH_PHYS_VIRT 22 select ARM_PATCH_PHYS_VIRT
23 select MIGHT_HAVE_CACHE_L2X0
23 help 24 help
24 This enables support for systems based on the Freescale i.MX3 and i.MX6 25 This enables support for systems based on the Freescale i.MX3 and i.MX6
25 family. 26 family.