summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9g45_devices.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-02-15 20:51:37 +0800
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-02-23 14:57:57 +0100
commit205056a3ea33f5aca7adffa4584eb6572b1d3273 (patch)
tree1672d459205d815001b097ff951a55c8a1299b86 /arch/arm/mach-at91/at91sam9g45_devices.c
parentb55149529d265718a989b67468c4f03de0d3af7a (diff)
downloadop-kernel-dev-205056a3ea33f5aca7adffa4584eb6572b1d3273.zip
op-kernel-dev-205056a3ea33f5aca7adffa4584eb6572b1d3273.tar.gz
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.c10
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 8c036ff..81d1adf 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 = {
.num_resources = ARRAY_SIZE(rtt_resources),
};
+#if IS_ENABLED(CONFIG_RTC_DRV_AT91SAM9)
+static void __init at91_add_device_rtt_rtc(void)
+{
+ at91sam9g45_rtt_device.name = "rtc-at91sam9";
+}
+#else
+static void __init at91_add_device_rtt_rtc(void) {}
+#endif
+
static void __init at91_add_device_rtt(void)
{
+ at91_add_device_rtt_rtc();
platform_device_register(&at91sam9g45_rtt_device);
}
OpenPOWER on IntegriCloud