diff options
author | Rob Herring <rob.herring@calxeda.com> | 2012-02-13 14:27:24 -0500 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2012-03-06 22:23:17 -0500 |
commit | b12e9ba59c83f7df846602b201b64e4ddf28ccee (patch) | |
tree | 69c5b7eaada4db4a683d87d30ad4a033ec9047d1 /arch/arm | |
parent | c177aa98e5a7bbf71bc28baf0516896e3bb13f6e (diff) |
ARM: msm: use runtime ioremap hook
Convert msm platforms to use run-time ioremap hook instead of the compile
time hook.
According to David Brown, only the msm7201 needed the ioremap hook.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Tested-by: David Brown <davidb@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-msm/board-halibut.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-trout.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-msm/include/mach/io.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-msm/include/mach/msm_iomap-7x00.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-msm/io.c | 8 |
5 files changed, 21 insertions, 10 deletions
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c index a60ab6d04ec5..3698a370d636 100644 --- a/arch/arm/mach-msm/board-halibut.c +++ b/arch/arm/mach-msm/board-halibut.c | |||
@@ -68,6 +68,11 @@ static struct platform_device *devices[] __initdata = { | |||
68 | 68 | ||
69 | extern struct sys_timer msm_timer; | 69 | extern struct sys_timer msm_timer; |
70 | 70 | ||
71 | static void __init halibut_init_early(void) | ||
72 | { | ||
73 | arch_ioremap_caller = __msm_ioremap_caller; | ||
74 | } | ||
75 | |||
71 | static void __init halibut_init_irq(void) | 76 | static void __init halibut_init_irq(void) |
72 | { | 77 | { |
73 | msm_init_irq(); | 78 | msm_init_irq(); |
@@ -96,6 +101,7 @@ MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)") | |||
96 | .atag_offset = 0x100, | 101 | .atag_offset = 0x100, |
97 | .fixup = halibut_fixup, | 102 | .fixup = halibut_fixup, |
98 | .map_io = halibut_map_io, | 103 | .map_io = halibut_map_io, |
104 | .init_early = halibut_init_early, | ||
99 | .init_irq = halibut_init_irq, | 105 | .init_irq = halibut_init_irq, |
100 | .init_machine = halibut_init, | 106 | .init_machine = halibut_init, |
101 | .timer = &msm_timer, | 107 | .timer = &msm_timer, |
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c index 6b9b227c87c5..5414f76ec0a9 100644 --- a/arch/arm/mach-msm/board-trout.c +++ b/arch/arm/mach-msm/board-trout.c | |||
@@ -43,6 +43,11 @@ static struct platform_device *devices[] __initdata = { | |||
43 | 43 | ||
44 | extern struct sys_timer msm_timer; | 44 | extern struct sys_timer msm_timer; |
45 | 45 | ||
46 | static void __init trout_init_early(void) | ||
47 | { | ||
48 | arch_ioremap_caller = __msm_ioremap_caller; | ||
49 | } | ||
50 | |||
46 | static void __init trout_init_irq(void) | 51 | static void __init trout_init_irq(void) |
47 | { | 52 | { |
48 | msm_init_irq(); | 53 | msm_init_irq(); |
@@ -96,6 +101,7 @@ MACHINE_START(TROUT, "HTC Dream") | |||
96 | .atag_offset = 0x100, | 101 | .atag_offset = 0x100, |
97 | .fixup = trout_fixup, | 102 | .fixup = trout_fixup, |
98 | .map_io = trout_map_io, | 103 | .map_io = trout_map_io, |
104 | .init_early = trout_init_early, | ||
99 | .init_irq = trout_init_irq, | 105 | .init_irq = trout_init_irq, |
100 | .init_machine = trout_init, | 106 | .init_machine = trout_init, |
101 | .timer = &msm_timer, | 107 | .timer = &msm_timer, |
diff --git a/arch/arm/mach-msm/include/mach/io.h b/arch/arm/mach-msm/include/mach/io.h index dc1b928745e9..c6ff9bb8db31 100644 --- a/arch/arm/mach-msm/include/mach/io.h +++ b/arch/arm/mach-msm/include/mach/io.h | |||
@@ -18,11 +18,6 @@ | |||
18 | 18 | ||
19 | #define IO_SPACE_LIMIT 0xffffffff | 19 | #define IO_SPACE_LIMIT 0xffffffff |
20 | 20 | ||
21 | #define __arch_ioremap __msm_ioremap | ||
22 | #define __arch_iounmap __iounmap | ||
23 | |||
24 | void __iomem *__msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype); | ||
25 | |||
26 | #define __io(a) __typesafe_io(a) | 21 | #define __io(a) __typesafe_io(a) |
27 | #define __mem_pci(a) (a) | 22 | #define __mem_pci(a) (a) |
28 | 23 | ||
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h index 8af46123dab6..152b3b70afab 100644 --- a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h +++ b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h | |||
@@ -111,5 +111,11 @@ | |||
111 | #define MSM_AD5_PHYS 0xAC000000 | 111 | #define MSM_AD5_PHYS 0xAC000000 |
112 | #define MSM_AD5_SIZE (SZ_1M*13) | 112 | #define MSM_AD5_SIZE (SZ_1M*13) |
113 | 113 | ||
114 | #ifndef __ASSEMBLY__ | ||
115 | |||
116 | extern void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size, | ||
117 | unsigned int mtype, void *caller); | ||
118 | |||
119 | #endif | ||
114 | 120 | ||
115 | #endif | 121 | #endif |
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c index 578b04e42deb..a1e7b1168850 100644 --- a/arch/arm/mach-msm/io.c +++ b/arch/arm/mach-msm/io.c | |||
@@ -172,8 +172,8 @@ void __init msm_map_msm7x30_io(void) | |||
172 | } | 172 | } |
173 | #endif /* CONFIG_ARCH_MSM7X30 */ | 173 | #endif /* CONFIG_ARCH_MSM7X30 */ |
174 | 174 | ||
175 | void __iomem * | 175 | void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size, |
176 | __msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype) | 176 | unsigned int mtype, void *caller) |
177 | { | 177 | { |
178 | if (mtype == MT_DEVICE) { | 178 | if (mtype == MT_DEVICE) { |
179 | /* The peripherals in the 88000000 - D0000000 range | 179 | /* The peripherals in the 88000000 - D0000000 range |
@@ -184,7 +184,5 @@ __msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype) | |||
184 | mtype = MT_DEVICE_NONSHARED; | 184 | mtype = MT_DEVICE_NONSHARED; |
185 | } | 185 | } |
186 | 186 | ||
187 | return __arm_ioremap_caller(phys_addr, size, mtype, | 187 | return __arm_ioremap_caller(phys_addr, size, mtype, caller); |
188 | __builtin_return_address(0)); | ||
189 | } | 188 | } |
190 | EXPORT_SYMBOL(__msm_ioremap); | ||