aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-05 17:19:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-05 17:19:54 -0400
commitff050ad12c551233e546506409c89eb2f640d9f3 (patch)
tree8ae29fece122a91cbd6160fb2ca34c0ea82c3df9 /arch/arm/mm
parentdfc25e4503aef6b82a1de4a0fbe19aafa8648fbe (diff)
parent9233087dc468f75bdeb7830c694c09dc74be88c4 (diff)
Merge tag 'soc-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC specific changes from Arnd Bergmann: "Lots of changes specific to one of the SoC families. Some that stick out are: - mach-qcom gains new features, most importantly SMP support for the newer chips (Stephen Boyd, Rohit Vaswani) - mvebu gains support for three new SoCs: Armada 375, 380 and 385 (Thomas Petazzoni and Free-electrons team) - SMP support for Rockchips (Heiko Stübner) - Lots of i.MX changes (Shawn Guo) - Added support for BCM5301x SoC (Hauke Mehrtens) - Multiplatform support for Marvell Kirkwood and Dove (Andrew Lunn and Sebastian Hesselbarth doing the final part of a long journey) - Unify davinci platforms and remove obsolete ones (Sekhar Nori, Arnd Bergmann)" * tag 'soc-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (126 commits) ARM: sunxi: Select HAVE_ARM_ARCH_TIMER ARM: cache-tauros2: remove ARMv6 code ARM: mvebu: don't select CONFIG_NEON ARM: davinci: fix DT booting with default defconfig ARM: configs: bcm_defconfig: enable bcm590xx regulator support ARM: davinci: remove tnetv107x support MAINTAINERS: Update ARM STi maintainers ARM: restrict BCM_KONA_UART to ARCH_BCM_MOBILE ARM: bcm21664: Add board support. ARM: sunxi: Add the new watchog compatibles to the reboot code ARM: enable ARM_HAS_SG_CHAIN for multiplatform ARM: davinci: remove da8xx_omapl_defconfig ARM: davinci: da8xx: fix multiple watchdog device registration ARM: davinci: add da8xx specific configs to davinci_all_defconfig ARM: davinci: enable da8xx build concurrently with older devices ARM: BCM5301X: workaround suppress fault ARM: BCM5301X: add early debugging support ARM: BCM5301X: initial support for the BCM5301X/BCM470X SoCs with ARM CPU ARM: mach-bcm: Remove GENERIC_TIME ARM: shmobile: APMU: Fix warnings due to improper printk formats ...
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/Kconfig2
-rw-r--r--arch/arm/mm/cache-feroceon-l2.c45
-rw-r--r--arch/arm/mm/cache-tauros2.c29
3 files changed, 46 insertions, 30 deletions
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 241622e2fea3..f5ad9ee70426 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -854,7 +854,7 @@ config OUTER_CACHE_SYNC
854 854
855config CACHE_FEROCEON_L2 855config CACHE_FEROCEON_L2
856 bool "Enable the Feroceon L2 cache controller" 856 bool "Enable the Feroceon L2 cache controller"
857 depends on ARCH_KIRKWOOD || ARCH_MV78XX0 857 depends on ARCH_KIRKWOOD || ARCH_MV78XX0 || ARCH_MVEBU
858 default y 858 default y
859 select OUTER_CACHE 859 select OUTER_CACHE
860 help 860 help
diff --git a/arch/arm/mm/cache-feroceon-l2.c b/arch/arm/mm/cache-feroceon-l2.c
index aae891820f8f..dc814a548056 100644
--- a/arch/arm/mm/cache-feroceon-l2.c
+++ b/arch/arm/mm/cache-feroceon-l2.c
@@ -13,10 +13,15 @@
13 */ 13 */
14 14
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/of.h>
17#include <linux/of_address.h>
16#include <linux/highmem.h> 18#include <linux/highmem.h>
19#include <linux/io.h>
17#include <asm/cacheflush.h> 20#include <asm/cacheflush.h>
18#include <asm/cp15.h> 21#include <asm/cp15.h>
19#include <plat/cache-feroceon-l2.h> 22#include <asm/hardware/cache-feroceon-l2.h>
23
24#define L2_WRITETHROUGH_KIRKWOOD BIT(4)
20 25
21/* 26/*
22 * Low-level cache maintenance operations. 27 * Low-level cache maintenance operations.
@@ -352,3 +357,41 @@ void __init feroceon_l2_init(int __l2_wt_override)
352 printk(KERN_INFO "Feroceon L2: Cache support initialised%s.\n", 357 printk(KERN_INFO "Feroceon L2: Cache support initialised%s.\n",
353 l2_wt_override ? ", in WT override mode" : ""); 358 l2_wt_override ? ", in WT override mode" : "");
354} 359}
360#ifdef CONFIG_OF
361static const struct of_device_id feroceon_ids[] __initconst = {
362 { .compatible = "marvell,kirkwood-cache"},
363 { .compatible = "marvell,feroceon-cache"},
364 {}
365};
366
367int __init feroceon_of_init(void)
368{
369 struct device_node *node;
370 void __iomem *base;
371 bool l2_wt_override = false;
372 struct resource res;
373
374#if defined(CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH)
375 l2_wt_override = true;
376#endif
377
378 node = of_find_matching_node(NULL, feroceon_ids);
379 if (node && of_device_is_compatible(node, "marvell,kirkwood-cache")) {
380 if (of_address_to_resource(node, 0, &res))
381 return -ENODEV;
382
383 base = ioremap(res.start, resource_size(&res));
384 if (!base)
385 return -ENOMEM;
386
387 if (l2_wt_override)
388 writel(readl(base) | L2_WRITETHROUGH_KIRKWOOD, base);
389 else
390 writel(readl(base) & ~L2_WRITETHROUGH_KIRKWOOD, base);
391 }
392
393 feroceon_l2_init(l2_wt_override);
394
395 return 0;
396}
397#endif
diff --git a/arch/arm/mm/cache-tauros2.c b/arch/arm/mm/cache-tauros2.c
index 1be0f4e5e6eb..b273739e6359 100644
--- a/arch/arm/mm/cache-tauros2.c
+++ b/arch/arm/mm/cache-tauros2.c
@@ -33,7 +33,7 @@
33 * outer cache operations into the kernel image if the kernel has been 33 * outer cache operations into the kernel image if the kernel has been
34 * configured to support a pre-v7 CPU. 34 * configured to support a pre-v7 CPU.
35 */ 35 */
36#if __LINUX_ARM_ARCH__ < 7 36#ifdef CONFIG_CPU_32v5
37/* 37/*
38 * Low-level cache maintenance operations. 38 * Low-level cache maintenance operations.
39 */ 39 */
@@ -229,33 +229,6 @@ static void __init tauros2_internal_init(unsigned int features)
229 } 229 }
230#endif 230#endif
231 231
232#ifdef CONFIG_CPU_32v6
233 /*
234 * Check whether this CPU lacks support for the v7 hierarchical
235 * cache ops. (PJ4 is in its v6 personality mode if the MMFR3
236 * register indicates no support for the v7 hierarchical cache
237 * ops.)
238 */
239 if (cpuid_scheme() && (read_mmfr3() & 0xf) == 0) {
240 /*
241 * When Tauros2 is used in an ARMv6 system, the L2
242 * enable bit is in the ARMv6 ARM-mandated position
243 * (bit [26] of the System Control Register).
244 */
245 if (!(get_cr() & 0x04000000)) {
246 printk(KERN_INFO "Tauros2: Enabling L2 cache.\n");
247 adjust_cr(0x04000000, 0x04000000);
248 }
249
250 mode = "ARMv6";
251 outer_cache.inv_range = tauros2_inv_range;
252 outer_cache.clean_range = tauros2_clean_range;
253 outer_cache.flush_range = tauros2_flush_range;
254 outer_cache.disable = tauros2_disable;
255 outer_cache.resume = tauros2_resume;
256 }
257#endif
258
259#ifdef CONFIG_CPU_32v7 232#ifdef CONFIG_CPU_32v7
260 /* 233 /*
261 * Check whether this CPU has support for the v7 hierarchical 234 * Check whether this CPU has support for the v7 hierarchical