diff options
-rw-r--r-- | arch/arm/mach-imx/mm-imx3.c | 10 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/hardware.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/io.h | 17 |
3 files changed, 8 insertions, 22 deletions
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index 8404ee72555a..04be18d87e45 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c | |||
@@ -59,8 +59,8 @@ static void imx3_idle(void) | |||
59 | : "=r" (reg)); | 59 | : "=r" (reg)); |
60 | } | 60 | } |
61 | 61 | ||
62 | static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size, | 62 | static void __iomem *imx3_ioremap_caller(unsigned long phys_addr, size_t size, |
63 | unsigned int mtype) | 63 | unsigned int mtype, void *caller) |
64 | { | 64 | { |
65 | if (mtype == MT_DEVICE) { | 65 | if (mtype == MT_DEVICE) { |
66 | /* | 66 | /* |
@@ -73,7 +73,7 @@ static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size, | |||
73 | mtype = MT_DEVICE_NONSHARED; | 73 | mtype = MT_DEVICE_NONSHARED; |
74 | } | 74 | } |
75 | 75 | ||
76 | return __arm_ioremap(phys_addr, size, mtype); | 76 | return __arm_ioremap_caller(phys_addr, size, mtype, caller); |
77 | } | 77 | } |
78 | 78 | ||
79 | void imx3_init_l2x0(void) | 79 | void imx3_init_l2x0(void) |
@@ -132,7 +132,7 @@ void __init imx31_init_early(void) | |||
132 | { | 132 | { |
133 | mxc_set_cpu_type(MXC_CPU_MX31); | 133 | mxc_set_cpu_type(MXC_CPU_MX31); |
134 | mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); | 134 | mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); |
135 | imx_ioremap = imx3_ioremap; | 135 | arch_ioremap_caller = imx3_ioremap_caller; |
136 | arm_pm_idle = imx3_idle; | 136 | arm_pm_idle = imx3_idle; |
137 | } | 137 | } |
138 | 138 | ||
@@ -196,7 +196,7 @@ void __init imx35_init_early(void) | |||
196 | mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); | 196 | mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); |
197 | mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); | 197 | mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); |
198 | arm_pm_idle = imx3_idle; | 198 | arm_pm_idle = imx3_idle; |
199 | imx_ioremap = imx3_ioremap; | 199 | arch_ioremap_caller = imx3_ioremap_caller; |
200 | } | 200 | } |
201 | 201 | ||
202 | void __init mx35_init_irq(void) | 202 | void __init mx35_init_irq(void) |
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 | |||
23 | extern void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int); | ||
24 | |||
25 | static 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 | ||