diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-02-15 07:51:37 -0500 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-02-23 08:57:57 -0500 |
commit | 205056a3ea33f5aca7adffa4584eb6572b1d3273 (patch) | |
tree | 1672d459205d815001b097ff951a55c8a1299b86 /arch/arm/mach-at91/at91sam9g45_devices.c | |
parent | b55149529d265718a989b67468c4f03de0d3af7a (diff) |
ARM: at91/rtc-at91sam9: each SoC can select the RTT device to use
For the RTT as RTC driver rtc-at91sam9, the platform_device structure
is filled during SoC initialization. This will allow to convert this
RTC driver as a standard platform driver.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9g45_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45_devices.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index 8c036ff10bb6..81d1adf1d978 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -1204,8 +1204,18 @@ static struct platform_device at91sam9g45_rtt_device = { | |||
1204 | .num_resources = ARRAY_SIZE(rtt_resources), | 1204 | .num_resources = ARRAY_SIZE(rtt_resources), |
1205 | }; | 1205 | }; |
1206 | 1206 | ||
1207 | #if IS_ENABLED(CONFIG_RTC_DRV_AT91SAM9) | ||
1208 | static void __init at91_add_device_rtt_rtc(void) | ||
1209 | { | ||
1210 | at91sam9g45_rtt_device.name = "rtc-at91sam9"; | ||
1211 | } | ||
1212 | #else | ||
1213 | static void __init at91_add_device_rtt_rtc(void) {} | ||
1214 | #endif | ||
1215 | |||
1207 | static void __init at91_add_device_rtt(void) | 1216 | static void __init at91_add_device_rtt(void) |
1208 | { | 1217 | { |
1218 | at91_add_device_rtt_rtc(); | ||
1209 | platform_device_register(&at91sam9g45_rtt_device); | 1219 | platform_device_register(&at91sam9g45_rtt_device); |
1210 | } | 1220 | } |
1211 | 1221 | ||