aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9261_devices.c
diff options
context:
space:
mode:
authorAndrew Victor <linux@maxim.org.za>2008-01-23 03:11:13 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-01-26 10:00:31 -0500
commit884f5a6a8dc8646d5904f166adf3c558be57e1ab (patch)
treec8d6283782b9d0f00d380052276c066d289c73d5 /arch/arm/mach-at91/at91sam9261_devices.c
parente2920802351b3e01a3e70a26bb1bbb22f29da4cb (diff)
[ARM] 4752/1: [AT91] RTT, RTC and WDT peripherals on SAM9
Add platform_device and initialization for the RTT (Real Time Timer) and WDT (Watchdog) integrated in the Atmel AT91SAM9 processors. For SAM9263, register both RTT peripherals. [From: David Brownell <dbrownell@users.sourceforge.net>] Provide platform_resources for RTT peripherals [From: David Brownell <dbrownell@users.sourceforge.net>] Add support for RTC peripheral on AT91SAM9RL (same RTC peripherals as AT91RM9200) [From: David Brownell <dbrownell@users.sourceforge.net>] Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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 1d03844a607a..17f3f6a24796 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