at91: add arch specific ioremap support
[pandora-kernel.git] / arch / arm / mach-at91 / at91cap9.c
index bdf5097..bfc6844 100644 (file)
 #include "generic.h"
 #include "clock.h"
 
-static struct map_desc at91cap9_sram_desc[] __initdata = {
-       {
-               .virtual        = AT91_IO_VIRT_BASE - AT91CAP9_SRAM_SIZE,
-               .pfn            = __phys_to_pfn(AT91CAP9_SRAM_BASE),
-               .length         = AT91CAP9_SRAM_SIZE,
-               .type           = MT_DEVICE,
-       },
-};
-
 /* --------------------------------------------------------------------
  *  Clocks
  * -------------------------------------------------------------------- */
@@ -337,7 +328,7 @@ static void at91cap9_poweroff(void)
 
 static void __init at91cap9_map_io(void)
 {
-       iotable_init(at91cap9_sram_desc, ARRAY_SIZE(at91cap9_sram_desc));
+       at91_init_sram(0, AT91CAP9_SRAM_BASE, AT91CAP9_SRAM_SIZE);
 }
 
 static void __init at91cap9_initialize(void)
@@ -346,9 +337,6 @@ static void __init at91cap9_initialize(void)
        pm_power_off = at91cap9_poweroff;
        at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1);
 
-       /* Register the processor-specific clocks */
-       at91cap9_register_clocks();
-
        /* Register GPIO subsystem */
        at91_gpio_init(at91cap9_gpio, 4);
 
@@ -404,5 +392,6 @@ static unsigned int at91cap9_default_irq_priority[NR_AIC_IRQS] __initdata = {
 struct at91_init_soc __initdata at91cap9_soc = {
        .map_io = at91cap9_map_io,
        .default_irq_priority = at91cap9_default_irq_priority,
+       .register_clocks = at91cap9_register_clocks,
        .init = at91cap9_initialize,
 };