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-pxa | |
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-pxa')
-rw-r--r-- | arch/arm/mach-pxa/devices.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 5bc13121eac5..84f2d7015cfe 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c | |||
@@ -406,20 +406,17 @@ static struct resource pxa_rtc_resources[] = { | |||
406 | [1] = { | 406 | [1] = { |
407 | .start = IRQ_RTC1Hz, | 407 | .start = IRQ_RTC1Hz, |
408 | .end = IRQ_RTC1Hz, | 408 | .end = IRQ_RTC1Hz, |
409 | .name = "rtc 1Hz", | ||
409 | .flags = IORESOURCE_IRQ, | 410 | .flags = IORESOURCE_IRQ, |
410 | }, | 411 | }, |
411 | [2] = { | 412 | [2] = { |
412 | .start = IRQ_RTCAlrm, | 413 | .start = IRQ_RTCAlrm, |
413 | .end = IRQ_RTCAlrm, | 414 | .end = IRQ_RTCAlrm, |
415 | .name = "rtc alarm", | ||
414 | .flags = IORESOURCE_IRQ, | 416 | .flags = IORESOURCE_IRQ, |
415 | }, | 417 | }, |
416 | }; | 418 | }; |
417 | 419 | ||
418 | struct platform_device sa1100_device_rtc = { | ||
419 | .name = "sa1100-rtc", | ||
420 | .id = -1, | ||
421 | }; | ||
422 | |||
423 | struct platform_device pxa_device_rtc = { | 420 | struct platform_device pxa_device_rtc = { |
424 | .name = "pxa-rtc", | 421 | .name = "pxa-rtc", |
425 | .id = -1, | 422 | .id = -1, |
@@ -427,6 +424,27 @@ struct platform_device pxa_device_rtc = { | |||
427 | .resource = pxa_rtc_resources, | 424 | .resource = pxa_rtc_resources, |
428 | }; | 425 | }; |
429 | 426 | ||
427 | static struct resource sa1100_rtc_resources[] = { | ||
428 | { | ||
429 | .start = IRQ_RTC1Hz, | ||
430 | .end = IRQ_RTC1Hz, | ||
431 | .name = "rtc 1Hz", | ||
432 | .flags = IORESOURCE_IRQ, | ||
433 | }, { | ||
434 | .start = IRQ_RTCAlrm, | ||
435 | .end = IRQ_RTCAlrm, | ||
436 | .name = "rtc alarm", | ||
437 | .flags = IORESOURCE_IRQ, | ||
438 | }, | ||
439 | }; | ||
440 | |||
441 | struct platform_device sa1100_device_rtc = { | ||
442 | .name = "sa1100-rtc", | ||
443 | .id = -1, | ||
444 | .num_resources = ARRAY_SIZE(sa1100_rtc_resources), | ||
445 | .resource = sa1100_rtc_resources, | ||
446 | }; | ||
447 | |||
430 | static struct resource pxa_ac97_resources[] = { | 448 | static struct resource pxa_ac97_resources[] = { |
431 | [0] = { | 449 | [0] = { |
432 | .start = 0x40500000, | 450 | .start = 0x40500000, |