Skip to content

Commit

Permalink
imx3: Add rtc platform device support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vladimir Zapolskiy authored and Sascha Hauer committed Apr 14, 2010
1 parent 2ba3abd commit ded518c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions arch/arm/mach-mx3/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,25 @@ struct platform_device imx_wdt_device0 = {
.resource = imx_wdt_resources,
};

static struct resource imx_rtc_resources[] = {
{
.start = MX31_RTC_BASE_ADDR,
.end = MX31_RTC_BASE_ADDR + 0x3fff,
.flags = IORESOURCE_MEM,
},
{
.start = MX31_INT_RTC,
.flags = IORESOURCE_IRQ,
},
};

struct platform_device imx_rtc_device0 = {
.name = "mxc_rtc",
.id = -1,
.num_resources = ARRAY_SIZE(imx_rtc_resources),
.resource = imx_rtc_resources,
};

static int __init mx3_devices_init(void)
{
if (cpu_is_mx31()) {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-mx3/devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ extern struct platform_device imx_ssi_device0;
extern struct platform_device imx_ssi_device1;
extern struct platform_device imx_ssi_device1;
extern struct platform_device imx_wdt_device0;
extern struct platform_device imx_rtc_device0;

0 comments on commit ded518c

Please sign in to comment.