aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9g45.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/at91sam9g45.c')
-rw-r--r--arch/arm/mach-at91/at91sam9g45.c45
1 files changed, 10 insertions, 35 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 11e214121b23..e04c5fb6f1ee 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -22,23 +22,10 @@
22#include <mach/at91_shdwc.h> 22#include <mach/at91_shdwc.h>
23#include <mach/cpu.h> 23#include <mach/cpu.h>
24 24
25#include "soc.h"
25#include "generic.h" 26#include "generic.h"
26#include "clock.h" 27#include "clock.h"
27 28
28static struct map_desc at91sam9g45_io_desc[] __initdata = {
29 {
30 .virtual = AT91_VA_BASE_SYS,
31 .pfn = __phys_to_pfn(AT91_BASE_SYS),
32 .length = SZ_16K,
33 .type = MT_DEVICE,
34 }, {
35 .virtual = AT91_IO_VIRT_BASE - AT91SAM9G45_SRAM_SIZE,
36 .pfn = __phys_to_pfn(AT91SAM9G45_SRAM_BASE),
37 .length = AT91SAM9G45_SRAM_SIZE,
38 .type = MT_DEVICE,
39 }
40};
41
42/* -------------------------------------------------------------------- 29/* --------------------------------------------------------------------
43 * Clocks 30 * Clocks
44 * -------------------------------------------------------------------- */ 31 * -------------------------------------------------------------------- */
@@ -329,24 +316,17 @@ static void at91sam9g45_poweroff(void)
329 * AT91SAM9G45 processor initialization 316 * AT91SAM9G45 processor initialization
330 * -------------------------------------------------------------------- */ 317 * -------------------------------------------------------------------- */
331 318
332void __init at91sam9g45_map_io(void) 319static void __init at91sam9g45_map_io(void)
333{ 320{
334 /* Map peripherals */ 321 at91_init_sram(0, AT91SAM9G45_SRAM_BASE, AT91SAM9G45_SRAM_SIZE);
335 iotable_init(at91sam9g45_io_desc, ARRAY_SIZE(at91sam9g45_io_desc));
336} 322}
337 323
338void __init at91sam9g45_initialize(unsigned long main_clock) 324static void __init at91sam9g45_initialize(void)
339{ 325{
340 at91_arch_reset = at91sam9g45_reset; 326 at91_arch_reset = at91sam9g45_reset;
341 pm_power_off = at91sam9g45_poweroff; 327 pm_power_off = at91sam9g45_poweroff;
342 at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0); 328 at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0);
343 329
344 /* Init clock subsystem */
345 at91_clock_init(main_clock);
346
347 /* Register the processor-specific clocks */
348 at91sam9g45_register_clocks();
349
350 /* Register GPIO subsystem */ 330 /* Register GPIO subsystem */
351 at91_gpio_init(at91sam9g45_gpio, 5); 331 at91_gpio_init(at91sam9g45_gpio, 5);
352} 332}
@@ -393,14 +373,9 @@ static unsigned int at91sam9g45_default_irq_priority[NR_AIC_IRQS] __initdata = {
393 0, /* Advanced Interrupt Controller (IRQ0) */ 373 0, /* Advanced Interrupt Controller (IRQ0) */
394}; 374};
395 375
396void __init at91sam9g45_init_interrupts(unsigned int priority[NR_AIC_IRQS]) 376struct at91_init_soc __initdata at91sam9g45_soc = {
397{ 377 .map_io = at91sam9g45_map_io,
398 if (!priority) 378 .default_irq_priority = at91sam9g45_default_irq_priority,
399 priority = at91sam9g45_default_irq_priority; 379 .register_clocks = at91sam9g45_register_clocks,
400 380 .init = at91sam9g45_initialize,
401 /* Initialize the AIC interrupt controller */ 381};
402 at91_aic_init(priority);
403
404 /* Enable GPIO interrupts */
405 at91_gpio_irq_setup();
406}