[ARM] pxa: add resources for incoming rtc-pxa driver
authorRobert Jarzmik <robert.jarzmik@free.fr>
Thu, 13 Nov 2008 22:50:56 +0000 (23:50 +0100)
committerEric Miao <eric.miao@marvell.com>
Tue, 2 Dec 2008 06:43:47 +0000 (14:43 +0800)
Add IO memory and IRQ ressources for pxa based SoC to be
able to use the new rtc-pxa driver.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
arch/arm/mach-pxa/devices.c
arch/arm/mach-pxa/devices.h
arch/arm/mach-pxa/pxa25x.c
arch/arm/mach-pxa/pxa27x.c
arch/arm/mach-pxa/pxa3xx.c

index 88c362651445c7bf4259fd251f9a9f3b748cd9fa..e16f8e3d58d349200fb64be936345e4f63b15d46 100644 (file)
@@ -330,11 +330,36 @@ void __init pxa_set_ficp_info(struct pxaficp_platform_data *info)
        pxa_register_device(&pxa_device_ficp, info);
 }
 
-struct platform_device pxa_device_rtc = {
+static struct resource pxa_rtc_resources[] = {
+       [0] = {
+               .start  = 0x40900000,
+               .end    = 0x40900000 + 0x3b,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = IRQ_RTC1Hz,
+               .end    = IRQ_RTC1Hz,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [2] = {
+               .start  = IRQ_RTCAlrm,
+               .end    = IRQ_RTCAlrm,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device sa1100_device_rtc = {
        .name           = "sa1100-rtc",
        .id             = -1,
 };
 
+struct platform_device pxa_device_rtc = {
+       .name           = "pxa-rtc",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(pxa_rtc_resources),
+       .resource       = pxa_rtc_resources,
+};
+
 static struct resource pxa_ac97_resources[] = {
        [0] = {
                .start  = 0x40500000,
index bb04af4b0aa3f7706b6124cd3ce1539e55d86288..ecc24a4dca6d52dce5dcefb88fbf24153d34a8ba 100644 (file)
@@ -11,6 +11,7 @@ extern struct platform_device pxa_device_hwuart;
 extern struct platform_device pxa_device_i2c;
 extern struct platform_device pxa_device_i2s;
 extern struct platform_device pxa_device_ficp;
+extern struct platform_device sa1100_device_rtc;
 extern struct platform_device pxa_device_rtc;
 extern struct platform_device pxa_device_ac97;
 
index 0f672998b2eb76e72269b1ca0af3f2722bc0f559..265b8a5657b7e1454c367283c38dcb65689cb5a5 100644 (file)
@@ -312,7 +312,7 @@ static struct platform_device *pxa25x_devices[] __initdata = {
        &pxa_device_btuart,
        &pxa_device_stuart,
        &pxa_device_i2s,
-       &pxa_device_rtc,
+       &sa1100_device_rtc,
        &pxa25x_device_ssp,
        &pxa25x_device_nssp,
        &pxa25x_device_assp,
index 7769718a80b4d1f57e89020e47b221c83fb6acfe..9fdef7641c2f9ca7b9172b431d184cb9b1363fe1 100644 (file)
@@ -333,6 +333,7 @@ static struct platform_device *devices[] __initdata = {
        &pxa_device_btuart,
        &pxa_device_stuart,
        &pxa_device_i2s,
+       &sa1100_device_rtc,
        &pxa_device_rtc,
        &pxa27x_device_ssp1,
        &pxa27x_device_ssp2,
index a9b17568473683a0ad95f94b85f8bdbdedc19373..041b8abb9e1a8b67fe054d58a9519a141eb8cc94 100644 (file)
@@ -541,6 +541,7 @@ static struct platform_device *devices[] __initdata = {
        &pxa_device_btuart,
        &pxa_device_stuart,
        &pxa_device_i2s,
+       &sa1100_device_rtc,
        &pxa_device_rtc,
        &pxa27x_device_ssp1,
        &pxa27x_device_ssp2,