ARM: ebsa110: use runtime ioremap hook
authorRob Herring <rob.herring@calxeda.com>
Wed, 7 Mar 2012 03:34:19 +0000 (21:34 -0600)
committerRob Herring <rob.herring@calxeda.com>
Wed, 7 Mar 2012 03:34:19 +0000 (21:34 -0600)
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>
arch/arm/mach-ebsa110/core.c
arch/arm/mach-ebsa110/include/mach/io.h

index 804c9122b7b3626e76eadcd3c950429612e87969..b049edbdf152627c321732b35e79115f7ca4d2f5 100644 (file)
@@ -119,6 +119,20 @@ static void __init ebsa110_map_io(void)
        iotable_init(ebsa110_io_desc, ARRAY_SIZE(ebsa110_io_desc));
 }
 
+static void __iomem *ebsa110_ioremap_caller(unsigned long cookie, size_t size,
+                                           unsigned int flags, void *caller)
+{
+       return (void __iomem *)cookie;
+}
+
+static void ebsa110_iounmap(volatile void __iomem *io_addr)
+{}
+
+static void __init ebsa110_init_early(void)
+{
+       arch_ioremap_caller = ebsa110_ioremap_caller;
+       arch_iounmap = ebsa110_iounmap;
+}
 
 #define PIT_CTRL               (PIT_BASE + 0x0d)
 #define PIT_T2                 (PIT_BASE + 0x09)
@@ -315,6 +329,7 @@ MACHINE_START(EBSA110, "EBSA110")
        .reserve_lp2    = 1,
        .restart_mode   = 's',
        .map_io         = ebsa110_map_io,
+       .init_early     = ebsa110_init_early,
        .init_irq       = ebsa110_init_irq,
        .timer          = &ebsa110_timer,
        .restart        = ebsa110_restart,
index 44679db672fbf54b1a55adc0304593e458545ef5..11bb0799424b537873adb81761f94bdc97c36b91 100644 (file)
@@ -62,15 +62,6 @@ void __writel(u32 val, void __iomem *addr);
 #define writew(v,b)            __writew(v,b)
 #define writel(v,b)            __writel(v,b)
 
-static inline void __iomem *__arch_ioremap(unsigned long cookie, size_t size,
-                                          unsigned int flags)
-{
-       return (void __iomem *)cookie;
-}
-
-#define __arch_ioremap         __arch_ioremap
-#define __arch_iounmap(cookie) do { } while (0)
-
 extern void insb(unsigned int port, void *buf, int sz);
 extern void insw(unsigned int port, void *buf, int sz);
 extern void insl(unsigned int port, void *buf, int sz);