aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/include/mach/io.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-10-31 16:18:02 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-10-31 16:18:02 +0900
commit0803d540db06f53acd2fabf1347d5b665218f14a (patch)
treef5f8e5510a76bb59d3583478961daf5afc32df08 /arch/arm/plat-mxc/include/mach/io.h
parenta8884e3415c29c58a5875d54c109c4a7fcaa6fb4 (diff)
parent721d5dfe7e516954c501d5e9d0dfab379cf4241a (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/arm/plat-mxc/include/mach/io.h')
-rw-r--r--arch/arm/plat-mxc/include/mach/io.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/include/mach/io.h b/arch/arm/plat-mxc/include/mach/io.h
index 65b6810124c..5d4cb119644 100644
--- a/arch/arm/plat-mxc/include/mach/io.h
+++ b/arch/arm/plat-mxc/include/mach/io.h
@@ -14,6 +14,26 @@
/* Allow IO space to be anywhere in the memory */
#define IO_SPACE_LIMIT 0xffffffff
+#ifdef CONFIG_ARCH_MX3
+#define __arch_ioremap __mx3_ioremap
+#define __arch_iounmap __iounmap
+
+static inline void __iomem *
+__mx3_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
+{
+ if (mtype == MT_DEVICE) {
+ /* Access all peripherals below 0x80000000 as nonshared device
+ * but leave l2cc alone.
+ */
+ if ((phys_addr < 0x80000000) && ((phys_addr < L2CC_BASE_ADDR) ||
+ (phys_addr >= L2CC_BASE_ADDR + L2CC_SIZE)))
+ mtype = MT_DEVICE_NONSHARED;
+ }
+
+ return __arm_ioremap(phys_addr, size, mtype);
+}
+#endif
+
/* io address mapping macro */
#define __io(a) ((void __iomem *)(a))