aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91cap9_devices.c
diff options
context:
space:
mode:
authorAndrew Victor <linux@maxim.org.za>2008-04-02 16:55:19 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-04 04:52:24 -0400
commit4fd9212cb9bad88ec7c8bf5313f53331905f957a (patch)
tree7aeda933234a76c6a5240fed992579ecffb015c3 /arch/arm/mach-at91/at91cap9_devices.c
parent565ac44593d17bdfc9f595614b56bb335a9b8d6f (diff)
[ARM] 4908/1: [AT91] RTT platform_device fix
The RTT-as-RTC driver will search for the user-specified RTT peripheral via ID number (0 .. 1). Therefore if the processor only contains a single RTT peripheral, we need to set its platform_device.id to "0" instead of "-1". Also add the missing platform_device resource for the CAP9 processor. Bug reported by Sedji Gaouaou. 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/at91cap9_devices.c')
-rw-r--r--arch/arm/mach-at91/at91cap9_devices.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c
index 10f15f3a56ca..7d782ee4117b 100644
--- a/arch/arm/mach-at91/at91cap9_devices.c
+++ b/arch/arm/mach-at91/at91cap9_devices.c
@@ -540,10 +540,19 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
540 * RTT 540 * RTT
541 * -------------------------------------------------------------------- */ 541 * -------------------------------------------------------------------- */
542 542
543static struct resource rtt_resources[] = {
544 {
545 .start = AT91_BASE_SYS + AT91_RTT,
546 .end = AT91_BASE_SYS + AT91_RTT + SZ_16 - 1,
547 .flags = IORESOURCE_MEM,
548 }
549};
550
543static struct platform_device at91cap9_rtt_device = { 551static struct platform_device at91cap9_rtt_device = {
544 .name = "at91_rtt", 552 .name = "at91_rtt",
545 .id = -1, 553 .id = 0,
546 .num_resources = 0, 554 .resource = rtt_resources,
555 .num_resources = ARRAY_SIZE(rtt_resources),
547}; 556};
548 557
549static void __init at91_add_device_rtt(void) 558static void __init at91_add_device_rtt(void)