diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9263.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9263.c | 51 |
1 files changed, 11 insertions, 40 deletions
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index dc28477d14ff..044f3c927e64 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -21,28 +21,10 @@ | |||
21 | #include <mach/at91_rstc.h> | 21 | #include <mach/at91_rstc.h> |
22 | #include <mach/at91_shdwc.h> | 22 | #include <mach/at91_shdwc.h> |
23 | 23 | ||
24 | #include "soc.h" | ||
24 | #include "generic.h" | 25 | #include "generic.h" |
25 | #include "clock.h" | 26 | #include "clock.h" |
26 | 27 | ||
27 | static struct map_desc at91sam9263_io_desc[] __initdata = { | ||
28 | { | ||
29 | .virtual = AT91_VA_BASE_SYS, | ||
30 | .pfn = __phys_to_pfn(AT91_BASE_SYS), | ||
31 | .length = SZ_16K, | ||
32 | .type = MT_DEVICE, | ||
33 | }, { | ||
34 | .virtual = AT91_IO_VIRT_BASE - AT91SAM9263_SRAM0_SIZE, | ||
35 | .pfn = __phys_to_pfn(AT91SAM9263_SRAM0_BASE), | ||
36 | .length = AT91SAM9263_SRAM0_SIZE, | ||
37 | .type = MT_DEVICE, | ||
38 | }, { | ||
39 | .virtual = AT91_IO_VIRT_BASE - AT91SAM9263_SRAM0_SIZE - AT91SAM9263_SRAM1_SIZE, | ||
40 | .pfn = __phys_to_pfn(AT91SAM9263_SRAM1_BASE), | ||
41 | .length = AT91SAM9263_SRAM1_SIZE, | ||
42 | .type = MT_DEVICE, | ||
43 | }, | ||
44 | }; | ||
45 | |||
46 | /* -------------------------------------------------------------------- | 28 | /* -------------------------------------------------------------------- |
47 | * Clocks | 29 | * Clocks |
48 | * -------------------------------------------------------------------- */ | 30 | * -------------------------------------------------------------------- */ |
@@ -313,24 +295,18 @@ static void at91sam9263_poweroff(void) | |||
313 | * AT91SAM9263 processor initialization | 295 | * AT91SAM9263 processor initialization |
314 | * -------------------------------------------------------------------- */ | 296 | * -------------------------------------------------------------------- */ |
315 | 297 | ||
316 | void __init at91sam9263_map_io(void) | 298 | static void __init at91sam9263_map_io(void) |
317 | { | 299 | { |
318 | /* Map peripherals */ | 300 | at91_init_sram(0, AT91SAM9263_SRAM0_BASE, AT91SAM9263_SRAM0_SIZE); |
319 | iotable_init(at91sam9263_io_desc, ARRAY_SIZE(at91sam9263_io_desc)); | 301 | at91_init_sram(1, AT91SAM9263_SRAM1_BASE, AT91SAM9263_SRAM1_SIZE); |
320 | } | 302 | } |
321 | 303 | ||
322 | void __init at91sam9263_initialize(unsigned long main_clock) | 304 | static void __init at91sam9263_initialize(void) |
323 | { | 305 | { |
324 | at91_arch_reset = at91sam9_alt_reset; | 306 | at91_arch_reset = at91sam9_alt_reset; |
325 | pm_power_off = at91sam9263_poweroff; | 307 | pm_power_off = at91sam9263_poweroff; |
326 | at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); | 308 | at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); |
327 | 309 | ||
328 | /* Init clock subsystem */ | ||
329 | at91_clock_init(main_clock); | ||
330 | |||
331 | /* Register the processor-specific clocks */ | ||
332 | at91sam9263_register_clocks(); | ||
333 | |||
334 | /* Register GPIO subsystem */ | 310 | /* Register GPIO subsystem */ |
335 | at91_gpio_init(at91sam9263_gpio, 5); | 311 | at91_gpio_init(at91sam9263_gpio, 5); |
336 | } | 312 | } |
@@ -377,14 +353,9 @@ static unsigned int at91sam9263_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
377 | 0, /* Advanced Interrupt Controller (IRQ1) */ | 353 | 0, /* Advanced Interrupt Controller (IRQ1) */ |
378 | }; | 354 | }; |
379 | 355 | ||
380 | void __init at91sam9263_init_interrupts(unsigned int priority[NR_AIC_IRQS]) | 356 | struct at91_init_soc __initdata at91sam9263_soc = { |
381 | { | 357 | .map_io = at91sam9263_map_io, |
382 | if (!priority) | 358 | .default_irq_priority = at91sam9263_default_irq_priority, |
383 | priority = at91sam9263_default_irq_priority; | 359 | .register_clocks = at91sam9263_register_clocks, |
384 | 360 | .init = at91sam9263_initialize, | |
385 | /* Initialize the AIC interrupt controller */ | 361 | }; |
386 | at91_aic_init(priority); | ||
387 | |||
388 | /* Enable GPIO interrupts */ | ||
389 | at91_gpio_irq_setup(); | ||
390 | } | ||