aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/mm.c')
-rw-r--r--arch/arm/mach-mx3/mm.c37
1 files changed, 36 insertions, 1 deletions
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c
index 0589b5cd33c7..9e1459cb4b74 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
@@ -50,6 +54,16 @@ static struct map_desc mxc_io_desc[] __initdata = {
50 .pfn = __phys_to_pfn(AVIC_BASE_ADDR), 54 .pfn = __phys_to_pfn(AVIC_BASE_ADDR),
51 .length = AVIC_SIZE, 55 .length = AVIC_SIZE,
52 .type = MT_DEVICE_NONSHARED 56 .type = MT_DEVICE_NONSHARED
57 }, {
58 .virtual = AIPS1_BASE_ADDR_VIRT,
59 .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
60 .length = AIPS1_SIZE,
61 .type = MT_DEVICE_NONSHARED
62 }, {
63 .virtual = AIPS2_BASE_ADDR_VIRT,
64 .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
65 .length = AIPS2_SIZE,
66 .type = MT_DEVICE_NONSHARED
53 }, 67 },
54}; 68};
55 69
@@ -62,3 +76,24 @@ void __init mxc_map_io(void)
62{ 76{
63 iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); 77 iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
64} 78}
79
80#ifdef CONFIG_CACHE_L2X0
81static int mxc_init_l2x0(void)
82{
83 void __iomem *l2x0_base;
84
85 l2x0_base = ioremap(L2CC_BASE_ADDR, 4096);
86 if (IS_ERR(l2x0_base)) {
87 printk(KERN_ERR "remapping L2 cache area failed with %ld\n",
88 PTR_ERR(l2x0_base));
89 return 0;
90 }
91
92 l2x0_init(l2x0_base, 0x00030024, 0x00000000);
93
94 return 0;
95}
96
97arch_initcall(mxc_init_l2x0);
98#endif
99