arm: lpc32xx: add rtc-device
authorWolfram Sang <w.sang@pengutronix.de>
Mon, 28 Mar 2011 14:51:35 +0000 (16:51 +0200)
committerWolfram Sang <w.sang@pengutronix.de>
Tue, 12 Jul 2011 08:57:13 +0000 (10:57 +0200)
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Kevin Wells <Kevin.wells@nxp.com>
arch/arm/mach-lpc32xx/common.c
arch/arm/mach-lpc32xx/common.h

index 6880b47..205b2db 100644 (file)
@@ -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
  */
index e81243c..5583f52 100644 (file)
@@ -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