RTC: sa1100: support sa1100, pxa and mmp soc families
PATCH 3/3 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.
--- arch/arm/mach-pxa/devices.c | 20 +++ arch/arm/mach-sa1100/generic.c | 20 +++ drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-sa1100.c | 276 ++++++++++++++++++++++++++++------------ 4 files changed, 238 insertions(+), 80 deletions(-)
arch/arm/mach-pxa/devices.c +20 -0
@@ -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 = { .name ="sa1100-rtc" , .id =-1 , + .num_resources =ARRAY_SIZE (sa1100_rtc_resources), + .resource = sa1100_rtc_resources, };struct platform_device pxa_device_rtc = {
arch/arm/mach-sa1100/generic.c +20 -0
@@ -334,9 +334,29 @@ void sa11x0_register_irda(struct irda_platform_data *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 = { .name ="sa1100-rtc" , .id =-1 , + .resource = sa11x0rtc_resources, + .num_resources =ARRAY_SIZE (sa11x0rtc_resources), };static struct platform_device *sa11x0_devices[]__initdata = {
drivers/rtc/Kconfig +1 -1
@@ -774,7 +774,7 @@ config RTC_DRV_EP93XX config RTC_DRV_SA1100 tristate "SA11x0/PXA2xx" - depends on ARCH_SA1100 || ARCH_PXA + depends on ARCH_SA1100 || ARCH_PXA || ARCH_MMP help If you say Y here you will get access to the real time clock built into your SA11x0 or PXA2xx CPU.
drivers/rtc/rtc-sa1100.c +197 -79
443 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 3/3 RTC: sa1100: support sa1100, pxa and mmp soc families
Quoted 10 lines · Jett.Zhou
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 Jett.Zhou <[email protected]>--- arch/arm/mach-pxa/devices.c | 20 +++ arch/arm/mach-sa1100/generic.c | 20 +++ drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-sa1100.c | 276 ++++++++++++++++++++++++++++------------ 4 files changed, 238 insertions(+), 80 deletions(-)
I looked through the series and found nothing to complain about ;-)
Excellent cleanup!
Haojian Zhuang
maintainerPATCH 3/3 RTC: sa1100: support sa1100, pxa and mmp soc families
Quoted 12 lines · Arnd Bergmann
Quoted 10 lines · Jett.Zhou
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 Jett.Zhou <[email protected]>---
?arch/arm/mach-pxa/devices.c ? ?| ? 20 +++ ?arch/arm/mach-sa1100/generic.c | ? 20 +++ ?drivers/rtc/Kconfig ? ? ? ? ? ?| ? ?2 +- ?drivers/rtc/rtc-sa1100.c ? ? ? | ?276 ++++++++++++++++++++++++++++------------?4 files changed, 238 insertions(+), 80 deletions(-)
Quoted 7 lines
I looked through the series and found nothing to complain about ;-)
Excellent cleanup!
Acked-by Arnd Bergmann <[email protected]>
How about merging this patch series into arch-pxa git tree?
Best Regards
Haojian
PATCH 3/3 RTC: sa1100: support sa1100, pxa and mmp soc families
Quoted 13 lines · Haojian Zhuang
Quoted 12 lines · Arnd Bergmann
Quoted 10 lines · Jett.Zhou
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 Jett.Zhou <[email protected]>--- arch/arm/mach-pxa/devices.c | 20 +++ arch/arm/mach-sa1100/generic.c | 20 +++ drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-sa1100.c | 276 ++++++++++++++++++++++++++++------------ 4 files changed, 238 insertions(+), 80 deletions(-)
Quoted 9 lines
Quoted 7 lines
I looked through the series and found nothing to complain about ;-)
Excellent cleanup!
Acked-by Arnd Bergmann <[email protected]>How about merging this patch series into arch-pxa git tree?
I could do that with an Ack from Alessandro, but normally it should go through his tree. I guess it should also go through the rtc-linux mailing list, though I don't know how active that is.
Arnd
PATCH 3/3 RTC: sa1100: support sa1100, pxa and mmp soc families
Quoted 3 lines · On Fri, 25 Nov 2011 17:19:38 +0000 Arnd Bergmann <[email protected]> wrote:
I could do that with an Ack from Alessandro, but normally it should go through his tree. I guess it should also go through the rtc-linux mailing list, though I don't know how active that is.
Hi,
I keep any eye on the list but the patches can go thru their specific
subsystem tree. Given that the RTC are closely coupled with a specific board/arch, it makes no sense to handle them differently.
Signature · 6 lines
Best regards, Alessandro Zummo, Tower Technologies - Torino, Italy http://www.towertech.it
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 3/3 RTC: sa1100: support sa1100, pxa and mmp soc families
Quoted 3 lines · On Sat, 26 Nov 2011 05:43:50 -0800 Jett Zhou <[email protected]> wrote:
Hi Alessandro
Do you mean that it check different id such as RTC_SA1100 and RTC_MMP in the driver? Actually, the Soc evolves SA1100->PXA->MMP, the RTC module are almost the same, except that the clock control of it is adjusted from MMP, so we distinguish it and do clk setting for MMP.
No, I meant that your patch can go thru in the arch tree.
Signature · 6 lines
Best regards, Alessandro Zummo, Tower Technologies - Torino, Italy http://www.towertech.it
Haojian Zhuang
maintainerPATCH 3/3 RTC: sa1100: support sa1100, pxa and mmp soc families
In reply to Alessandro ZummoQuoted 7 lines · Alessandro Zummo
Quoted 3 lines · On Fri, 25 Nov 2011 17:19:38 +0000 Arnd Bergmann <[email protected]> wrote:
I could do that with an Ack from Alessandro, but normally it should go through his tree. I guess it should also go through the rtc-linux mailing list, though I don't know how active that is.
Quoted 6 lines
?Hi,
?I keep any eye on the list but the patches can go thru their specific ?subsystem tree. Given that the RTC are closely coupled with a specific board/arch, ?it makes no sense to handle them differently.
Thanks a lot :)
Best Regards
Haojian
Robert Jarzmik
maintainerPATCH 3/3 RTC: sa1100: support sa1100, pxa and mmp soc families
In reply to Jett.ZhouQuoted 2 lines · Jett.Zhou
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.
Hi Jett.Zhou,
That's a very good work.
...zip...
Quoted 6 lines
static int
sa1100_rtc_remove(struct platform_device *pdev){drivers/rtc/rtc-sa1100.c +1
-2-struct rtc_device *rtc =platform_get_drvdata (pdev); +struct sa1100_rtc *sa1100_rtc =platform_get_drvdata (pdev); -if (rtc)
drivers/rtc/rtc-sa1100.c static int sa1100_rtc_probe(struct platform_device *pdev) · line 417
Quoted 10 lines
drivers/rtc/rtc-sa1100.c +8
-1-rtc_device_unregister (rtc); +rtc_device_unregister (sa1100_rtc->rtc); +if (sa1100_rtc->id ==RTC_MMP ) { +clk_unprepare (sa1100_rtc->clk); +clk_disable (sa1100_rtc->clk); + } +spin_lock_irq (&sa1100_rtc->lock); +iounmap (sa1100_rtc->base); +spin_unlock_irq (&sa1100_rtc->lock);
Why the spin lock here ?
Cheers.
--
Robert