Commit 7cea0065 authored by Jett.Zhou's avatar Jett.Zhou Committed by Arnd Bergmann

RTC: sa1100: support sa1100, pxa and mmp soc families

Since the regmap of rtc on sa1100, pxa and mmp Marvell soc families are
almost the same, so re-arch the rtc-sa1100 to support them.
Signed-off-by: default avatarJett.Zhou <jtzhou@marvell.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarHaojian Zhuang <haojian.zhuang@gmail.com>
Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 42874759
...@@ -415,9 +415,29 @@ static struct resource pxa_rtc_resources[] = { ...@@ -415,9 +415,29 @@ static struct resource pxa_rtc_resources[] = {
}, },
}; };
static struct resource sa1100_rtc_resources[] = {
[0] = {
.start = 0x40900000,
.end = 0x409000ff,
.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 = { struct platform_device sa1100_device_rtc = {
.name = "sa1100-rtc", .name = "sa1100-rtc",
.id = -1, .id = -1,
.num_resources = ARRAY_SIZE(sa1100_rtc_resources),
.resource = sa1100_rtc_resources,
}; };
struct platform_device pxa_device_rtc = { struct platform_device pxa_device_rtc = {
......
...@@ -334,9 +334,29 @@ void sa11x0_register_irda(struct irda_platform_data *irda) ...@@ -334,9 +334,29 @@ void sa11x0_register_irda(struct irda_platform_data *irda)
sa11x0_register_device(&sa11x0ir_device, irda); sa11x0_register_device(&sa11x0ir_device, irda);
} }
static struct resource sa11x0rtc_resources[] = {
[0] = {
.start = 0x90010000,
.end = 0x900100ff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_RTC1Hz,
.end = IRQ_RTC1Hz,
.flags = IORESOURCE_IRQ,
},
[2] = {
.start = IRQ_RTCAlrm,
.end = IRQ_RTCAlrm,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device sa11x0rtc_device = { static struct platform_device sa11x0rtc_device = {
.name = "sa1100-rtc", .name = "sa1100-rtc",
.id = -1, .id = -1,
.resource = sa11x0rtc_resources,
.num_resources = ARRAY_SIZE(sa11x0rtc_resources),
}; };
static struct platform_device *sa11x0_devices[] __initdata = { static struct platform_device *sa11x0_devices[] __initdata = {
......
...@@ -774,7 +774,7 @@ config RTC_DRV_EP93XX ...@@ -774,7 +774,7 @@ config RTC_DRV_EP93XX
config RTC_DRV_SA1100 config RTC_DRV_SA1100
tristate "SA11x0/PXA2xx" tristate "SA11x0/PXA2xx"
depends on ARCH_SA1100 || ARCH_PXA depends on ARCH_SA1100 || ARCH_PXA || ARCH_MMP
help help
If you say Y here you will get access to the real time clock If you say Y here you will get access to the real time clock
built into your SA11x0 or PXA2xx CPU. built into your SA11x0 or PXA2xx CPU.
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment