]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-mx3/mm.c
Merge branch 'for-rmk' of git://gitorious.org/linux-gemini/mainline into devel
[linux-2.6-omap-h63xx.git] / arch / arm / mach-mx3 / mm.c
index 0589b5cd33c7be5fd08a5a59013ada0f85ce457f..9e1459cb4b74891d960baff040476f9d322e6449 100644 (file)
 
 #include <linux/mm.h>
 #include <linux/init.h>
-#include <mach/hardware.h>
+#include <linux/err.h>
+
 #include <asm/pgtable.h>
 #include <asm/mach/map.h>
+#include <asm/hardware/cache-l2x0.h>
+
 #include <mach/common.h>
+#include <mach/hardware.h>
 
 /*!
  * @file mm.c
@@ -50,6 +54,16 @@ static struct map_desc mxc_io_desc[] __initdata = {
                .pfn            = __phys_to_pfn(AVIC_BASE_ADDR),
                .length         = AVIC_SIZE,
                .type           = MT_DEVICE_NONSHARED
+       }, {
+               .virtual        = AIPS1_BASE_ADDR_VIRT,
+               .pfn            = __phys_to_pfn(AIPS1_BASE_ADDR),
+               .length         = AIPS1_SIZE,
+               .type           = MT_DEVICE_NONSHARED
+       }, {
+               .virtual        = AIPS2_BASE_ADDR_VIRT,
+               .pfn            = __phys_to_pfn(AIPS2_BASE_ADDR),
+               .length         = AIPS2_SIZE,
+               .type           = MT_DEVICE_NONSHARED
        },
 };
 
@@ -62,3 +76,24 @@ void __init mxc_map_io(void)
 {
        iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
 }
+
+#ifdef CONFIG_CACHE_L2X0
+static int mxc_init_l2x0(void)
+{
+       void __iomem *l2x0_base;
+
+       l2x0_base = ioremap(L2CC_BASE_ADDR, 4096);
+       if (IS_ERR(l2x0_base)) {
+               printk(KERN_ERR "remapping L2 cache area failed with %ld\n",
+                               PTR_ERR(l2x0_base));
+               return 0;
+       }
+
+       l2x0_init(l2x0_base, 0x00030024, 0x00000000);
+
+       return 0;
+}
+
+arch_initcall(mxc_init_l2x0);
+#endif
+