diff options
author | Vladimir Zapolskiy <vzapolskiy@gmail.com> | 2010-03-24 07:32:17 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-04-14 02:57:03 -0400 |
commit | ded518c60967793706f19b2c63dc43deac29ef6f (patch) | |
tree | 00b98062e1fb6144bff03dbb496afb081909675f /arch | |
parent | 2ba3abd8186f24c7fb418927025b4e2120e3a362 (diff) |
imx3: Add rtc platform device support
This patch adds support for build-in RTC device found on
Freescale imx31 and imx35 SoCs.
Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx3/devices.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices.h | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index f8911154a9fa..1ffed283d6cd 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -588,6 +588,25 @@ struct platform_device imx_wdt_device0 = { | |||
588 | .resource = imx_wdt_resources, | 588 | .resource = imx_wdt_resources, |
589 | }; | 589 | }; |
590 | 590 | ||
591 | static struct resource imx_rtc_resources[] = { | ||
592 | { | ||
593 | .start = MX31_RTC_BASE_ADDR, | ||
594 | .end = MX31_RTC_BASE_ADDR + 0x3fff, | ||
595 | .flags = IORESOURCE_MEM, | ||
596 | }, | ||
597 | { | ||
598 | .start = MX31_INT_RTC, | ||
599 | .flags = IORESOURCE_IRQ, | ||
600 | }, | ||
601 | }; | ||
602 | |||
603 | struct platform_device imx_rtc_device0 = { | ||
604 | .name = "mxc_rtc", | ||
605 | .id = -1, | ||
606 | .num_resources = ARRAY_SIZE(imx_rtc_resources), | ||
607 | .resource = imx_rtc_resources, | ||
608 | }; | ||
609 | |||
591 | static int __init mx3_devices_init(void) | 610 | static int __init mx3_devices_init(void) |
592 | { | 611 | { |
593 | if (cpu_is_mx31()) { | 612 | if (cpu_is_mx31()) { |
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 4f77eb501274..b1687ad72052 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h | |||
@@ -27,3 +27,4 @@ extern struct platform_device imx_ssi_device0; | |||
27 | extern struct platform_device imx_ssi_device1; | 27 | extern struct platform_device imx_ssi_device1; |
28 | extern struct platform_device imx_ssi_device1; | 28 | extern struct platform_device imx_ssi_device1; |
29 | extern struct platform_device imx_wdt_device0; | 29 | extern struct platform_device imx_wdt_device0; |
30 | extern struct platform_device imx_rtc_device0; | ||