diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9260.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9260.c | 51 |
1 files changed, 47 insertions, 4 deletions
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index 3477ba94c4c5..aab1f969a7c3 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/platform_device.h> | ||
14 | #include <linux/clk/at91_pmc.h> | 15 | #include <linux/clk/at91_pmc.h> |
15 | 16 | ||
16 | #include <asm/proc-fns.h> | 17 | #include <asm/proc-fns.h> |
@@ -24,7 +25,6 @@ | |||
24 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
25 | 26 | ||
26 | #include "at91_aic.h" | 27 | #include "at91_aic.h" |
27 | #include "at91_rstc.h" | ||
28 | #include "soc.h" | 28 | #include "soc.h" |
29 | #include "generic.h" | 29 | #include "generic.h" |
30 | #include "sam9_smc.h" | 30 | #include "sam9_smc.h" |
@@ -342,8 +342,6 @@ static void __init at91sam9260_map_io(void) | |||
342 | 342 | ||
343 | static void __init at91sam9260_ioremap_registers(void) | 343 | static void __init at91sam9260_ioremap_registers(void) |
344 | { | 344 | { |
345 | at91_ioremap_shdwc(AT91SAM9260_BASE_SHDWC); | ||
346 | at91_ioremap_rstc(AT91SAM9260_BASE_RSTC); | ||
347 | at91_ioremap_ramc(0, AT91SAM9260_BASE_SDRAMC, 512); | 345 | at91_ioremap_ramc(0, AT91SAM9260_BASE_SDRAMC, 512); |
348 | at91sam926x_ioremap_pit(AT91SAM9260_BASE_PIT); | 346 | at91sam926x_ioremap_pit(AT91SAM9260_BASE_PIT); |
349 | at91sam9_ioremap_smc(0, AT91SAM9260_BASE_SMC); | 347 | at91sam9_ioremap_smc(0, AT91SAM9260_BASE_SMC); |
@@ -354,7 +352,6 @@ static void __init at91sam9260_ioremap_registers(void) | |||
354 | static void __init at91sam9260_initialize(void) | 352 | static void __init at91sam9260_initialize(void) |
355 | { | 353 | { |
356 | arm_pm_idle = at91sam9_idle; | 354 | arm_pm_idle = at91sam9_idle; |
357 | arm_pm_restart = at91sam9_alt_restart; | ||
358 | 355 | ||
359 | at91_sysirq_mask_rtt(AT91SAM9260_BASE_RTT); | 356 | at91_sysirq_mask_rtt(AT91SAM9260_BASE_RTT); |
360 | 357 | ||
@@ -362,6 +359,45 @@ static void __init at91sam9260_initialize(void) | |||
362 | at91_gpio_init(at91sam9260_gpio, 3); | 359 | at91_gpio_init(at91sam9260_gpio, 3); |
363 | } | 360 | } |
364 | 361 | ||
362 | static struct resource rstc_resources[] = { | ||
363 | [0] = { | ||
364 | .start = AT91SAM9260_BASE_RSTC, | ||
365 | .end = AT91SAM9260_BASE_RSTC + SZ_16 - 1, | ||
366 | .flags = IORESOURCE_MEM, | ||
367 | }, | ||
368 | [1] = { | ||
369 | .start = AT91SAM9260_BASE_SDRAMC, | ||
370 | .end = AT91SAM9260_BASE_SDRAMC + SZ_512 - 1, | ||
371 | .flags = IORESOURCE_MEM, | ||
372 | }, | ||
373 | }; | ||
374 | |||
375 | static struct platform_device rstc_device = { | ||
376 | .name = "at91-sam9260-reset", | ||
377 | .resource = rstc_resources, | ||
378 | .num_resources = ARRAY_SIZE(rstc_resources), | ||
379 | }; | ||
380 | |||
381 | static struct resource shdwc_resources[] = { | ||
382 | [0] = { | ||
383 | .start = AT91SAM9260_BASE_SHDWC, | ||
384 | .end = AT91SAM9260_BASE_SHDWC + SZ_16 - 1, | ||
385 | .flags = IORESOURCE_MEM, | ||
386 | }, | ||
387 | }; | ||
388 | |||
389 | static struct platform_device shdwc_device = { | ||
390 | .name = "at91-poweroff", | ||
391 | .resource = shdwc_resources, | ||
392 | .num_resources = ARRAY_SIZE(shdwc_resources), | ||
393 | }; | ||
394 | |||
395 | static void __init at91sam9260_register_devices(void) | ||
396 | { | ||
397 | platform_device_register(&rstc_device); | ||
398 | platform_device_register(&shdwc_device); | ||
399 | } | ||
400 | |||
365 | /* -------------------------------------------------------------------- | 401 | /* -------------------------------------------------------------------- |
366 | * Interrupt initialization | 402 | * Interrupt initialization |
367 | * -------------------------------------------------------------------- */ | 403 | * -------------------------------------------------------------------- */ |
@@ -404,6 +440,11 @@ static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
404 | 0, /* Advanced Interrupt Controller */ | 440 | 0, /* Advanced Interrupt Controller */ |
405 | }; | 441 | }; |
406 | 442 | ||
443 | static void __init at91sam9260_init_time(void) | ||
444 | { | ||
445 | at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS); | ||
446 | } | ||
447 | |||
407 | AT91_SOC_START(at91sam9260) | 448 | AT91_SOC_START(at91sam9260) |
408 | .map_io = at91sam9260_map_io, | 449 | .map_io = at91sam9260_map_io, |
409 | .default_irq_priority = at91sam9260_default_irq_priority, | 450 | .default_irq_priority = at91sam9260_default_irq_priority, |
@@ -411,5 +452,7 @@ AT91_SOC_START(at91sam9260) | |||
411 | | (1 << AT91SAM9260_ID_IRQ2), | 452 | | (1 << AT91SAM9260_ID_IRQ2), |
412 | .ioremap_registers = at91sam9260_ioremap_registers, | 453 | .ioremap_registers = at91sam9260_ioremap_registers, |
413 | .register_clocks = at91sam9260_register_clocks, | 454 | .register_clocks = at91sam9260_register_clocks, |
455 | .register_devices = at91sam9260_register_devices, | ||
414 | .init = at91sam9260_initialize, | 456 | .init = at91sam9260_initialize, |
457 | .init_time = at91sam9260_init_time, | ||
415 | AT91_SOC_END | 458 | AT91_SOC_END |