diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-02-07 20:00:50 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-03-13 05:34:29 -0400 |
commit | cb88214d726b337d49c1f65cbc5e5ac85837b11b (patch) | |
tree | 286cb0b63eeb16c4c3f3f728813cabc2298dc730 /arch | |
parent | 9536ff33619e13fcc4bd16354faea97dba244f73 (diff) |
[ARM] MX31/MX35: Add l2x0 cache support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx3/mm.c | 27 | ||||
-rw-r--r-- | arch/arm/mm/Kconfig | 3 |
2 files changed, 28 insertions, 2 deletions
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c index 0589b5cd33c7..44fcb6679f9a 100644 --- a/arch/arm/mach-mx3/mm.c +++ b/arch/arm/mach-mx3/mm.c | |||
@@ -22,10 +22,14 @@ | |||
22 | 22 | ||
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <mach/hardware.h> | 25 | #include <linux/err.h> |
26 | |||
26 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
27 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
29 | #include <asm/hardware/cache-l2x0.h> | ||
30 | |||
28 | #include <mach/common.h> | 31 | #include <mach/common.h> |
32 | #include <mach/hardware.h> | ||
29 | 33 | ||
30 | /*! | 34 | /*! |
31 | * @file mm.c | 35 | * @file mm.c |
@@ -62,3 +66,24 @@ void __init mxc_map_io(void) | |||
62 | { | 66 | { |
63 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | 67 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); |
64 | } | 68 | } |
69 | |||
70 | #ifdef CONFIG_CACHE_L2X0 | ||
71 | static int mxc_init_l2x0(void) | ||
72 | { | ||
73 | void __iomem *l2x0_base; | ||
74 | |||
75 | l2x0_base = ioremap(L2CC_BASE_ADDR, 4096); | ||
76 | if (IS_ERR(l2x0_base)) { | ||
77 | printk(KERN_ERR "remapping L2 cache area failed with %ld\n", | ||
78 | PTR_ERR(l2x0_base)); | ||
79 | return 0; | ||
80 | } | ||
81 | |||
82 | l2x0_init(l2x0_base, 0x00030024, 0x00000000); | ||
83 | |||
84 | return 0; | ||
85 | } | ||
86 | |||
87 | arch_initcall(mxc_init_l2x0); | ||
88 | #endif | ||
89 | |||
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index d490f3773c01..0d8581f11211 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -704,7 +704,8 @@ config CACHE_FEROCEON_L2_WRITETHROUGH | |||
704 | 704 | ||
705 | config CACHE_L2X0 | 705 | config CACHE_L2X0 |
706 | bool "Enable the L2x0 outer cache controller" | 706 | bool "Enable the L2x0 outer cache controller" |
707 | depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || REALVIEW_EB_A9MP | 707 | depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \ |
708 | REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 | ||
708 | default y | 709 | default y |
709 | select OUTER_CACHE | 710 | select OUTER_CACHE |
710 | help | 711 | help |