diff options
author | Haojian Zhuang <haojian.zhuang@marvell.com> | 2012-02-20 22:51:13 -0500 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@marvell.com> | 2012-02-27 21:07:50 -0500 |
commit | 3888c09074db2ca561c74571dcbd777949a856b8 (patch) | |
tree | 5aa1919517a274176dd13b4030141eba9df68a3c /arch/arm/mach-sa1100/generic.c | |
parent | 1d8c38c3d1b48eeb9cfaa42a8be13a1423569eb2 (diff) |
rtc: sa1100: declare irq in resource
Avoid to hard coded irq in rtc-sa1100 driver since we could share
it among arch-sa1100/arch-pxa/arch-mmp.
We still keep hard coded register address since the requirement is
enabling both rtc-sa1100 and rtc-pxa driver. The register addresses
are conflict since they're only two wrappers on the same rtc device.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-sa1100/generic.c')
-rw-r--r-- | arch/arm/mach-sa1100/generic.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index bb10ee2cb89f..7c1ebf4a7920 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -345,9 +345,17 @@ void sa11x0_register_irda(struct irda_platform_data *irda) | |||
345 | sa11x0_register_device(&sa11x0ir_device, irda); | 345 | sa11x0_register_device(&sa11x0ir_device, irda); |
346 | } | 346 | } |
347 | 347 | ||
348 | static struct resource sa1100_rtc_resources[] = { | ||
349 | DEFINE_RES_MEM(0x90010000, 0x9001003f), | ||
350 | DEFINE_RES_IRQ_NAMED(IRQ_RTC1Hz, "rtc 1Hz"), | ||
351 | DEFINE_RES_IRQ_NAMED(IRQ_RTCAlrm, "rtc alarm"), | ||
352 | }; | ||
353 | |||
348 | static struct platform_device sa11x0rtc_device = { | 354 | static struct platform_device sa11x0rtc_device = { |
349 | .name = "sa1100-rtc", | 355 | .name = "sa1100-rtc", |
350 | .id = -1, | 356 | .id = -1, |
357 | .num_resources = ARRAY_SIZE(sa1100_rtc_resources), | ||
358 | .resource = sa1100_rtc_resources, | ||
351 | }; | 359 | }; |
352 | 360 | ||
353 | static struct platform_device *sa11x0_devices[] __initdata = { | 361 | static struct platform_device *sa11x0_devices[] __initdata = { |