diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2011-03-28 16:51:35 +0200 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2011-07-12 10:57:13 +0200 |
commit | 1c72f9eaa53e920f142f4c1d20b4fc82b1a10ed5 (patch) | |
tree | c1e0de4e02382be247096c18de69a47850d629fc /arch/arm | |
parent | 7db2b37751caa2f17b026223a382eca07c90c575 (diff) |
arm: lpc32xx: add rtc-device
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Kevin Wells <Kevin.wells@nxp.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-lpc32xx/common.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-lpc32xx/common.h | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c index 6880b47a9ae..205b2dbb565 100644 --- a/arch/arm/mach-lpc32xx/common.c +++ b/arch/arm/mach-lpc32xx/common.c @@ -116,6 +116,27 @@ struct platform_device lpc32xx_tsc_device = { .resource = lpc32xx_tsc_resources, }; +/* RTC */ + +static struct resource lpc32xx_rtc_resources[] = { + { + .start = LPC32XX_RTC_BASE, + .end = LPC32XX_RTC_BASE + SZ_4K - 1, + .flags = IORESOURCE_MEM, + },{ + .start = IRQ_LPC32XX_RTC, + .end = IRQ_LPC32XX_RTC, + .flags = IORESOURCE_IRQ, + }, +}; + +struct platform_device lpc32xx_rtc_device = { + .name = "rtc-lpc32xx", + .id = -1, + .num_resources = ARRAY_SIZE(lpc32xx_rtc_resources), + .resource = lpc32xx_rtc_resources, +}; + /* * Returns the unique ID for the device */ diff --git a/arch/arm/mach-lpc32xx/common.h b/arch/arm/mach-lpc32xx/common.h index e81243c79f7..5583f52662b 100644 --- a/arch/arm/mach-lpc32xx/common.h +++ b/arch/arm/mach-lpc32xx/common.h @@ -29,6 +29,7 @@ extern struct platform_device lpc32xx_i2c0_device; extern struct platform_device lpc32xx_i2c1_device; extern struct platform_device lpc32xx_i2c2_device; extern struct platform_device lpc32xx_tsc_device; +extern struct platform_device lpc32xx_rtc_device; /* * Other arch specific structures and functions |