aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc/include/mach/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-mxc/include/mach/io.h')
-rw-r--r--arch/arm/plat-mxc/include/mach/io.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/arch/arm/plat-mxc/include/mach/io.h b/arch/arm/plat-mxc/include/mach/io.h
index 4347a87d2bb0..338300b18b00 100644
--- a/arch/arm/plat-mxc/include/mach/io.h
+++ b/arch/arm/plat-mxc/include/mach/io.h
@@ -14,32 +14,22 @@
14/* Allow IO space to be anywhere in the memory */ 14/* Allow IO space to be anywhere in the memory */
15#define IO_SPACE_LIMIT 0xffffffff 15#define IO_SPACE_LIMIT 0xffffffff
16 16
17#if defined(CONFIG_SOC_IMX31) || defined(CONFIG_SOC_IMX35)
18#include <mach/hardware.h>
19
20#define __arch_ioremap __imx_ioremap 17#define __arch_ioremap __imx_ioremap
21#define __arch_iounmap __iounmap 18#define __arch_iounmap __iounmap
22 19
23#define addr_in_module(addr, mod) \ 20#define addr_in_module(addr, mod) \
24 ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE) 21 ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
25 22
23extern void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int);
24
26static inline void __iomem * 25static inline void __iomem *
27__imx_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype) 26__imx_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
28{ 27{
29 if (mtype == MT_DEVICE && (cpu_is_mx31() || cpu_is_mx35())) { 28 if (imx_ioremap != NULL)
30 /* 29 return imx_ioremap(phys_addr, size, mtype);
31 * Access all peripherals below 0x80000000 as nonshared device 30 else
32 * on mx3, but leave l2cc alone. Otherwise cache corruptions 31 return __arm_ioremap(phys_addr, size, mtype);
33 * can occur.
34 */
35 if (phys_addr < 0x80000000 &&
36 !addr_in_module(phys_addr, MX3x_L2CC))
37 mtype = MT_DEVICE_NONSHARED;
38 }
39
40 return __arm_ioremap(phys_addr, size, mtype);
41} 32}
42#endif
43 33
44/* io address mapping macro */ 34/* io address mapping macro */
45#define __io(a) __typesafe_io(a) 35#define __io(a) __typesafe_io(a)