aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2012-03-06 22:34:19 -0500
committerRob Herring <rob.herring@calxeda.com>2012-03-06 22:34:19 -0500
commited5bf6e884dc176acdd17cbc653154dc02718239 (patch)
tree61c04988efee9f7d53aa5e3f6f0a4fa6f89eb14d /arch
parentf449588c65e23637aef59cae2ea7b6b2b1b767ec (diff)
ARM: ebsa110: use runtime ioremap hook
Convert ebsa110 platforms to use run-time ioremap hook instead of the compile time hook. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Russell King <linux@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ebsa110/core.c15
-rw-r--r--arch/arm/mach-ebsa110/include/mach/io.h9
2 files changed, 15 insertions, 9 deletions
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index 804c9122b7b3..b049edbdf152 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -119,6 +119,20 @@ static void __init ebsa110_map_io(void)
119 iotable_init(ebsa110_io_desc, ARRAY_SIZE(ebsa110_io_desc)); 119 iotable_init(ebsa110_io_desc, ARRAY_SIZE(ebsa110_io_desc));
120} 120}
121 121
122static void __iomem *ebsa110_ioremap_caller(unsigned long cookie, size_t size,
123 unsigned int flags, void *caller)
124{
125 return (void __iomem *)cookie;
126}
127
128static void ebsa110_iounmap(volatile void __iomem *io_addr)
129{}
130
131static void __init ebsa110_init_early(void)
132{
133 arch_ioremap_caller = ebsa110_ioremap_caller;
134 arch_iounmap = ebsa110_iounmap;
135}
122 136
123#define PIT_CTRL (PIT_BASE + 0x0d) 137#define PIT_CTRL (PIT_BASE + 0x0d)
124#define PIT_T2 (PIT_BASE + 0x09) 138#define PIT_T2 (PIT_BASE + 0x09)
@@ -315,6 +329,7 @@ MACHINE_START(EBSA110, "EBSA110")
315 .reserve_lp2 = 1, 329 .reserve_lp2 = 1,
316 .restart_mode = 's', 330 .restart_mode = 's',
317 .map_io = ebsa110_map_io, 331 .map_io = ebsa110_map_io,
332 .init_early = ebsa110_init_early,
318 .init_irq = ebsa110_init_irq, 333 .init_irq = ebsa110_init_irq,
319 .timer = &ebsa110_timer, 334 .timer = &ebsa110_timer,
320 .restart = ebsa110_restart, 335 .restart = ebsa110_restart,
diff --git a/arch/arm/mach-ebsa110/include/mach/io.h b/arch/arm/mach-ebsa110/include/mach/io.h
index 44679db672fb..11bb0799424b 100644
--- a/arch/arm/mach-ebsa110/include/mach/io.h
+++ b/arch/arm/mach-ebsa110/include/mach/io.h
@@ -62,15 +62,6 @@ void __writel(u32 val, void __iomem *addr);
62#define writew(v,b) __writew(v,b) 62#define writew(v,b) __writew(v,b)
63#define writel(v,b) __writel(v,b) 63#define writel(v,b) __writel(v,b)
64 64
65static inline void __iomem *__arch_ioremap(unsigned long cookie, size_t size,
66 unsigned int flags)
67{
68 return (void __iomem *)cookie;
69}
70
71#define __arch_ioremap __arch_ioremap
72#define __arch_iounmap(cookie) do { } while (0)
73
74extern void insb(unsigned int port, void *buf, int sz); 65extern void insb(unsigned int port, void *buf, int sz);
75extern void insw(unsigned int port, void *buf, int sz); 66extern void insw(unsigned int port, void *buf, int sz);
76extern void insl(unsigned int port, void *buf, int sz); 67extern void insl(unsigned int port, void *buf, int sz);