RTC: sa1100: support sa1100, pxa and mmp soc families
PATCH v3 3/6 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 | 256 +++++++++++++++++++++++++++------------ 4 files changed, 218 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 +177 -79
417 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v3 3/6 RTC: sa1100: support sa1100, pxa and mmp soc families
Quoted 7 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]>Acked-by Arnd Bergmann <[email protected]>Acked-by Haojian Zhuang <[email protected]>Acked-by Robert Jarzmik <[email protected]>
just one comment
Quoted 21 lines
--- arch/arm/mach-pxa/devices.c | 20 +++ arch/arm/mach-sa1100/generic.c | 20 +++ drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-sa1100.c | 256 +++++++++++++++++++++++++++------------ 4 files changed, 218 insertions(+), 80 deletions(-)arch/arm/mach-pxa/devices.c +6
-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 , + },
arch/arm/mach-pxa/devices.c static struct resource pxa_rtc_resources[] = { · line 433
Quoted 10 lines
arch/arm/mach-pxa/devices.c +10
-0+ [1] = { + .start = IRQ_RTC1Hz, + .end = IRQ_RTC1Hz, + .flags = IORESOURCE_IRQ, + }, + [2] = { + .start = IRQ_RTCAlrm, + .end = IRQ_RTCAlrm, + .flags = IORESOURCE_IRQ, + },
please the MACRO
Best Regards,
J
PATCH v3 3/6 RTC: sa1100: support sa1100, pxa and mmp soc families
Quoted 42 lines · Jett.Zhou
Quoted 7 lines
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]>Acked-by Arnd Bergmann <[email protected]>Acked-by Haojian Zhuang <[email protected]>Acked-by Robert Jarzmik <[email protected]>just one comment
Quoted 29 lines
---
arch/arm/mach-pxa/devices.c | 20 +++ arch/arm/mach-sa1100/generic.c | 20 +++ drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-sa1100.c | 256+++++++++++++++++++++++++++------------ 4 files changed, 218 insertions(+), 80 deletions(-)
arch/arm/mach-pxa/devices.c +10
-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 ,
Quoted 8 lines
arch/arm/mach-pxa/devices.c static struct resource pxa_rtc_resources[] = { · line 433
Quoted 6 lines
arch/arm/mach-pxa/devices.c +6
-0+ }, + [2] = { + .start = IRQ_RTCAlrm, + .end = IRQ_RTCAlrm, + .flags = IORESOURCE_IRQ, + },please the MACRO
What? You mean "use uppercase" ?
Quoted 8 lines
Best Regards,
J_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v3 3/6 RTC: sa1100: support sa1100, pxa and mmp soc families
Quoted 51 lines · Marek Vasut
Quoted 42 lines · Jett.Zhou
Quoted 7 lines
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]>Acked-by Arnd Bergmann <[email protected]>Acked-by Haojian Zhuang <[email protected]>Acked-by Robert Jarzmik <[email protected]>just one comment
Quoted 29 lines
---
arch/arm/mach-pxa/devices.c | 20 +++ arch/arm/mach-sa1100/generic.c | 20 +++ drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-sa1100.c | 256+++++++++++++++++++++++++++------------ 4 files changed, 218 insertions(+), 80 deletions(-)
arch/arm/mach-pxa/devices.c +10
-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 ,Quoted 8 lines
arch/arm/mach-pxa/devices.c static struct resource pxa_rtc_resources[] = { · line 433
Quoted 6 lines
arch/arm/mach-pxa/devices.c +6
-0+ }, + [2] = { + .start = IRQ_RTCAlrm, + .end = IRQ_RTCAlrm, + .flags = IORESOURCE_IRQ, + },please the MACRO
Quoted 1 line
What? You mean "use uppercase" ?
The DEFINE_RES_xxx() macros.
PATCH v3 3/6 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.
Err. This looks wrong. What's the clk stuff doing in here? It seems to be completely unused by the driver, and then both PXA and SA1100 end up having to provide a 'dummy' clk structure to satisfy this additional useless code.
If it's a case that "every driver must use a clk" then there's a policy error somewhere.
Haojian Zhuang
maintainerPATCH v3 3/6 RTC: sa1100: support sa1100, pxa and mmp soc families
Quoted 11 lines · Russell King - ARM Linux
Quoted 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.
Err. ?This looks wrong. ?What's the clk stuff doing in here? ?It seems to be completely unused by the driver, and then both PXA and SA1100 end up having to provide a 'dummy' clk structure to satisfy this additional useless code.
If it's a case that "every driver must use a clk" then there's a policy error somewhere.
Since this RTC driver could be shared among sa1100, pxa, mmp. In sa1100 and pxa3xx, we don't have this clock. So we use dummy clock instead. For pxa95x and mmp series, we have this clock.
Best Regards
Haojian