aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2012-02-13 14:24:15 -0500
committerRob Herring <rob.herring@calxeda.com>2012-03-06 22:23:16 -0500
commitc177aa98e5a7bbf71bc28baf0516896e3bb13f6e (patch)
treeca3bebe028a4d4c4640146bde04bd95065a83b8a /arch/arm/plat-mxc
parent4fe7ef3a0811c33137ace0ed424dd0c01dd2d75e (diff)
ARM: imx: convert to common runtime ioremap hook
Convert i.MX platforms to use the common run-time ioremap hook instead of the imx specific hook. Also, move addr_in_module out of io.h. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Sascha Hauer <kernel@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r--arch/arm/plat-mxc/include/mach/hardware.h3
-rw-r--r--arch/arm/plat-mxc/include/mach/io.h17
2 files changed, 3 insertions, 17 deletions
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
index a599f01f8b92..ca06a686446f 100644
--- a/arch/arm/plat-mxc/include/mach/hardware.h
+++ b/arch/arm/plat-mxc/include/mach/hardware.h
@@ -28,6 +28,9 @@
28#define IOMEM(addr) ((void __force __iomem *)(addr)) 28#define IOMEM(addr) ((void __force __iomem *)(addr))
29#endif 29#endif
30 30
31#define addr_in_module(addr, mod) \
32 ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
33
31#define IMX_IO_P2V_MODULE(addr, module) \ 34#define IMX_IO_P2V_MODULE(addr, module) \
32 (((addr) - module ## _BASE_ADDR) < module ## _SIZE ? \ 35 (((addr) - module ## _BASE_ADDR) < module ## _SIZE ? \
33 (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0) 36 (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0)
diff --git a/arch/arm/plat-mxc/include/mach/io.h b/arch/arm/plat-mxc/include/mach/io.h
index 338300b18b00..ea9d95edabbd 100644
--- a/arch/arm/plat-mxc/include/mach/io.h
+++ b/arch/arm/plat-mxc/include/mach/io.h
@@ -14,23 +14,6 @@
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#define __arch_ioremap __imx_ioremap
18#define __arch_iounmap __iounmap
19
20#define addr_in_module(addr, mod) \
21 ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
22
23extern void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int);
24
25static inline void __iomem *
26__imx_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
27{
28 if (imx_ioremap != NULL)
29 return imx_ioremap(phys_addr, size, mtype);
30 else
31 return __arm_ioremap(phys_addr, size, mtype);
32}
33
34/* io address mapping macro */ 17/* io address mapping macro */
35#define __io(a) __typesafe_io(a) 18#define __io(a) __typesafe_io(a)
36 19