diff options
author | Andrew Victor <linux@maxim.org.za> | 2008-04-02 20:55:19 (GMT) |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-04 08:52:24 (GMT) |
commit | 4fd9212cb9bad88ec7c8bf5313f53331905f957a (patch) | |
tree | 7aeda933234a76c6a5240fed992579ecffb015c3 | |
parent | 565ac44593d17bdfc9f595614b56bb335a9b8d6f (diff) | |
download | linux-fsl-qoriq-4fd9212cb9bad88ec7c8bf5313f53331905f957a.tar.xz |
[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>
-rw-r--r-- | arch/arm/mach-at91/at91cap9_devices.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9260_devices.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9261_devices.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl_devices.c | 2 |
4 files changed, 14 insertions, 5 deletions
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c index 10f15f3..7d782ee 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) * RTT * -------------------------------------------------------------------- */ +static struct resource rtt_resources[] = { + { + .start = AT91_BASE_SYS + AT91_RTT, + .end = AT91_BASE_SYS + AT91_RTT + SZ_16 - 1, + .flags = IORESOURCE_MEM, + } +}; + static struct platform_device at91cap9_rtt_device = { .name = "at91_rtt", - .id = -1, - .num_resources = 0, + .id = 0, + .resource = rtt_resources, + .num_resources = ARRAY_SIZE(rtt_resources), }; static void __init at91_add_device_rtt(void) diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index d613761..f20afe4 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c @@ -558,7 +558,7 @@ static struct resource rtt_resources[] = { static struct platform_device at91sam9260_rtt_device = { .name = "at91_rtt", - .id = -1, + .id = 0, .resource = rtt_resources, .num_resources = ARRAY_SIZE(rtt_resources), }; diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 48ecbef..0bd0edf 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c @@ -561,7 +561,7 @@ static struct resource rtt_resources[] = { static struct platform_device at91sam9261_rtt_device = { .name = "at91_rtt", - .id = -1, + .id = 0, .resource = rtt_resources, .num_resources = ARRAY_SIZE(rtt_resources), }; diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 2a0abd2..8982b02 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c @@ -423,7 +423,7 @@ static struct resource rtt_resources[] = { static struct platform_device at91sam9rl_rtt_device = { .name = "at91_rtt", - .id = -1, + .id = 0, .resource = rtt_resources, .num_resources = ARRAY_SIZE(rtt_resources), }; |