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/at91sam9rl_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/at91sam9rl_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl_devices.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 936cf20bc54f..dd248c837a77 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -693,8 +693,18 @@ static struct platform_device at91sam9rl_rtt_device = { | |||
693 | .num_resources = ARRAY_SIZE(rtt_resources), | 693 | .num_resources = ARRAY_SIZE(rtt_resources), |
694 | }; | 694 | }; |
695 | 695 | ||
696 | #if IS_ENABLED(CONFIG_RTC_DRV_AT91SAM9) | ||
697 | static void __init at91_add_device_rtt_rtc(void) | ||
698 | { | ||
699 | at91sam9rl_rtt_device.name = "rtc-at91sam9"; | ||
700 | } | ||
701 | #else | ||
702 | static void __init at91_add_device_rtt_rtc(void) {} | ||
703 | #endif | ||
704 | |||
696 | static void __init at91_add_device_rtt(void) | 705 | static void __init at91_add_device_rtt(void) |
697 | { | 706 | { |
707 | at91_add_device_rtt_rtc(); | ||
698 | platform_device_register(&at91sam9rl_rtt_device); | 708 | platform_device_register(&at91sam9rl_rtt_device); |
699 | } | 709 | } |
700 | 710 | ||