aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9260_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/at91sam9260_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/at91sam9260_devices.c')
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 3091bf47d8c9..1533556fb873 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -539,6 +539,51 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
539 539
540 540
541/* -------------------------------------------------------------------- 541/* --------------------------------------------------------------------
542 * RTT
543 * -------------------------------------------------------------------- */
544
545static struct resource rtt_resources[] = {
546 {
547 .start = AT91_BASE_SYS + AT91_RTT,
548 .end = AT91_BASE_SYS + AT91_RTT + SZ_16 - 1,
549 .flags = IORESOURCE_MEM,
550 }
551};
552
553static struct platform_device at91sam9260_rtt_device = {
554 .name = "at91_rtt",
555 .id = -1,
556 .resource = rtt_resources,
557 .num_resources = ARRAY_SIZE(rtt_resources),
558};
559
560static void __init at91_add_device_rtt(void)
561{
562 platform_device_register(&at91sam9260_rtt_device);
563}
564
565
566/* --------------------------------------------------------------------
567 * Watchdog
568 * -------------------------------------------------------------------- */
569
570#if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE)
571static struct platform_device at91sam9260_wdt_device = {
572 .name = "at91_wdt",
573 .id = -1,
574 .num_resources = 0,
575};
576
577static void __init at91_add_device_watchdog(void)
578{
579 platform_device_register(&at91sam9260_wdt_device);
580}
581#else
582static void __init at91_add_device_watchdog(void) {}
583#endif
584
585
586/* --------------------------------------------------------------------
542 * LEDs 587 * LEDs
543 * -------------------------------------------------------------------- */ 588 * -------------------------------------------------------------------- */
544 589
@@ -898,6 +943,8 @@ void __init at91_add_device_serial(void) {}
898 */ 943 */
899static int __init at91_add_standard_devices(void) 944static int __init at91_add_standard_devices(void)
900{ 945{
946 at91_add_device_rtt();
947 at91_add_device_watchdog();
901 return 0; 948 return 0;
902} 949}
903 950