aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9261_devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/at91sam9261_devices.c')
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 1d03844a607..17f3f6a2479 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -551,6 +551,51 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {}
551 551
552 552
553/* -------------------------------------------------------------------- 553/* --------------------------------------------------------------------
554 * RTT
555 * -------------------------------------------------------------------- */
556
557static struct resource rtt_resources[] = {
558 {
559 .start = AT91_BASE_SYS + AT91_RTT,
560 .end = AT91_BASE_SYS + AT91_RTT + SZ_16 - 1,
561 .flags = IORESOURCE_MEM,
562 }
563};
564
565static struct platform_device at91sam9261_rtt_device = {
566 .name = "at91_rtt",
567 .id = -1,
568 .resource = rtt_resources,
569 .num_resources = ARRAY_SIZE(rtt_resources),
570};
571
572static void __init at91_add_device_rtt(void)
573{
574 platform_device_register(&at91sam9261_rtt_device);
575}
576
577
578/* --------------------------------------------------------------------
579 * Watchdog
580 * -------------------------------------------------------------------- */
581
582#if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE)
583static struct platform_device at91sam9261_wdt_device = {
584 .name = "at91_wdt",
585 .id = -1,
586 .num_resources = 0,
587};
588
589static void __init at91_add_device_watchdog(void)
590{
591 platform_device_register(&at91sam9261_wdt_device);
592}
593#else
594static void __init at91_add_device_watchdog(void) {}
595#endif
596
597
598/* --------------------------------------------------------------------
554 * LEDs 599 * LEDs
555 * -------------------------------------------------------------------- */ 600 * -------------------------------------------------------------------- */
556 601
@@ -786,6 +831,8 @@ void __init at91_add_device_serial(void) {}
786 */ 831 */
787static int __init at91_add_standard_devices(void) 832static int __init at91_add_standard_devices(void)
788{ 833{
834 at91_add_device_rtt();
835 at91_add_device_watchdog();
789 return 0; 836 return 0;
790} 837}
791 838