aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2008-10-15 03:50:23 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2008-10-30 10:56:14 -0400
commiteadefeff9c5572d82c2f5d907a0bfb3ba55ce901 (patch)
tree430359c3e4c25be1c6df3997e6be7565701db667 /arch/arm
parent6c1249e588cbf0484fc3e6b0f0fc4a5892749b4d (diff)
[ARM] MX3: Use ioremap wrapper to map SoC devices nonshared
The internal devices of the MX3 Processor have to be mapped MT_DEVICE_NONSHARED devices, otherwise cache corruptions occur. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm')
-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 65b6810124c1..5d4cb1196441 100644
--- a/arch/arm/plat-mxc/include/mach/io.h
+++ b/arch/arm/plat-mxc/include/mach/io.h
@@ -14,6 +14,26 @@
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#ifdef CONFIG_ARCH_MX3
18#define __arch_ioremap __mx3_ioremap
19#define __arch_iounmap __iounmap
20
21static inline void __iomem *
22__mx3_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
23{
24 if (mtype == MT_DEVICE) {
25 /* Access all peripherals below 0x80000000 as nonshared device
26 * but leave l2cc alone.
27 */
28 if ((phys_addr < 0x80000000) && ((phys_addr < L2CC_BASE_ADDR) ||
29 (phys_addr >= L2CC_BASE_ADDR + L2CC_SIZE)))
30 mtype = MT_DEVICE_NONSHARED;
31 }
32
33 return __arm_ioremap(phys_addr, size, mtype);
34}
35#endif
36
17/* io address mapping macro */ 37/* io address mapping macro */
18#define __io(a) ((void __iomem *)(a)) 38#define __io(a) ((void __iomem *)(a))
19 39