@@ -30,6 +30,7 @@
/* Add spear13xx family device structure declarations here */
extern struct amba_device spear13xx_uart_device;
+extern struct platform_device spear13xx_rtc_device;
extern struct sys_timer spear13xx_timer;
/* Add spear1300 machine device structure declarations here */
@@ -22,6 +22,7 @@ static struct amba_device *amba_devs[] __initdata = {
};
static struct platform_device *plat_devs[] __initdata = {
+ &spear13xx_rtc_device,
};
static void __init spear1300_evb_init(void)
@@ -37,6 +37,25 @@ struct amba_device spear13xx_uart_device = {
.irq = {IRQ_UART, NO_IRQ},
};
+/* rtc device registration */
+static struct resource rtc_resources[] = {
+ {
+ .start = SPEAR13XX_RTC_BASE,
+ .end = SPEAR13XX_RTC_BASE + SZ_4K - 1,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = IRQ_RTC,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+struct platform_device spear13xx_rtc_device = {
+ .name = "rtc-spear",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(rtc_resources),
+ .resource = rtc_resources,
+};
+
/* Do spear13xx familiy common initialization part here */
void __init spear13xx_init(void)
{
@@ -33,6 +33,7 @@
/* Add spear3xx family device structure declarations here */
extern struct amba_device gpio_device;
extern struct amba_device uart_device;
+extern struct platform_device rtc_device;
extern struct sys_timer spear3xx_timer;
/* Add spear3xx family function declarations here */
@@ -44,6 +44,7 @@ static struct amba_device *amba_devs[] __initdata = {
static struct platform_device *plat_devs[] __initdata = {
/* spear3xx specific devices */
+ &rtc_device,
/* spear300 specific devices */
};
@@ -50,6 +50,7 @@ static struct amba_device *amba_devs[] __initdata = {
static struct platform_device *plat_devs[] __initdata = {
/* spear3xx specific devices */
+ &rtc_device,
/* spear310 specific devices */
&plgpio_device,
@@ -48,6 +48,7 @@ static struct amba_device *amba_devs[] __initdata = {
static struct platform_device *plat_devs[] __initdata = {
/* spear3xx specific devices */
+ &rtc_device,
/* spear320 specific devices */
&plgpio_device,
@@ -54,6 +54,25 @@ struct amba_device uart_device = {
.irq = {IRQ_UART, NO_IRQ},
};
+/* rtc device registration */
+static struct resource rtc_resources[] = {
+ {
+ .start = SPEAR3XX_ICM3_RTC_BASE,
+ .end = SPEAR3XX_ICM3_RTC_BASE + SZ_4K - 1,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = IRQ_BASIC_RTC,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+struct platform_device rtc_device = {
+ .name = "rtc-spear",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(rtc_resources),
+ .resource = rtc_resources,
+};
+
/* Do spear3xx familiy common initialization part here */
void __init spear3xx_init(void)
{
@@ -32,6 +32,7 @@
extern struct amba_device clcd_device;
extern struct amba_device gpio_device[];
extern struct amba_device uart_device[];
+extern struct platform_device rtc_device;
extern struct sys_timer spear6xx_timer;
/* Add spear6xx family function declarations here */
@@ -26,6 +26,7 @@ static struct amba_device *amba_devs[] __initdata = {
};
static struct platform_device *plat_devs[] __initdata = {
+ &rtc_device,
};
static void __init spear600_evb_init(void)
@@ -121,6 +121,25 @@ struct amba_device gpio_device[] = {
}
};
+/* rtc device registration */
+static struct resource rtc_resources[] = {
+ {
+ .start = SPEAR6XX_ICM3_RTC_BASE,
+ .end = SPEAR6XX_ICM3_RTC_BASE + SZ_4K - 1,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = IRQ_BASIC_RTC,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+struct platform_device rtc_device = {
+ .name = "rtc-spear",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(rtc_resources),
+ .resource = rtc_resources,
+};
+
/* This will add devices, and do machine specific tasks */
void __init spear6xx_init(void)
{