clocksource: Conexant CX92755 timers support
Subsystems (3)
Baruch Siach
maintainerv6 cover clocksource: Conexant CX92755 timers support
This short series adds support for the Conexant CX92755 SoC timers. This SoC is part of the Conexant Digicolor series of SoCs.
v6:
* Use a dedicated config symbol, CONFIG_DIGICOLOR_TIMER, to enable the driver (Daniel Lezcano)
v5:
http://thread.gmane.org/gmane.linux.kernel/1874237
* Switch back to use of_iomap (not of_io_request_and_map), as the watchdog driver also needs access to the same registers; add a comment clarifying this
Address more review comments by Daniel Lezcano:
* Properly encapsulate the static objects for the clock_event code
* Use dc_timer_{disable,enable,set_count} accessors to make the code clearer
v4:
http://thread.gmane.org/gmane.linux.kernel/1874017
Address review comments by Daniel Lezcano:
* Use macros for register configuration values
* Encapsulate static objects in a struct
* Use of_io_request_and_map to exclusively map registers
* Use UINT_MAX instead of ~0
* Use request_irq instead of setup_irq, obviating the need for a separate irqaction struct
v3:
http://article.gmane.org/gmane.linux.kernel/1870628
http://article.gmane.org/gmane.linux.kernel/1870627
* Split into a separate clocksource series
v2:
http://article.gmane.org/gmane.linux.kernel/1861850
http://article.gmane.org/gmane.linux.kernel/1861853
* Change the timer dt binding, so that the 'reg' property points to the first "Agent Communication" register. This should improve the chance of reusing this binding for other SoCs in this series.
* Add the CONTROL() and COUNT() macros to the timer driver to make the code clearer.
* Move arch/arm Kconfig changes from the clocksource driver patch to the base arch support patch to reduce dependency between them
v1:
http://article.gmane.org/gmane.linux.kernel/1855028
http://article.gmane.org/gmane.linux.kernel/1855025
Baruch Siach (2):
clocksource: devicetree: document Conexant Digicolor timer binding
clocksource: driver for Conexant Digicolor SoC timer
.../devicetree/bindings/timer/digicolor-timer.txt | 18 ++ drivers/clocksource/Kconfig | 3 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-digicolor.c | 199 +++++++++++++++++++++ 4 files changed, 221 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/digicolor-timer.txt create mode 100644 drivers/clocksource/timer-digicolor.c
Signature · 1 line
2.1.4
Baruch Siach
maintainerPATCH v6 1/2 clocksource: devicetree: document Conexant Digicolor timer binding
The Conexant CX92755 SoC provides 8 32-bit timers as part of its so called "Agent Communication" block. Timers can be configures either as free running or one shot. Each timer has a dedicated interrupt source in the CX92755 interrupts controller. The first timer (Timer A) can also be configured as watchdog.
This commit adds devicetree binding definition of this hardware module. The binding defined here should be reusable for other SoCs in the Digicolor series.
--- .../devicetree/bindings/timer/digicolor-timer.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/digicolor-timer.txt
Documentation/devicetree/bindings/timer/digicolor-timer.txt new file +18 -0
@@ -0,0 +1,18 @@ +Conexant Digicolor SoCs Timer Controller + +Required properties: + +- compatible : should be "cnxt,cx92755-timer" +- reg : Specifies base physical address and size of the "Agent Communication" + timer registers +- interrupts : Contains 8 interrupts, one for each timer +- clocks: phandle to the main clock + +Example: + + timer at f0000fc0 { + compatible = "cnxt,cx92755-timer"; + reg = <0xf0000fc0 0x40>; + interrupts = <19>, <31>, <34>, <35>, <52>, <53>, <54>, <55>; + clocks = <&main_clk>; + };
Signature · 1 line
2.1.4
Baruch Siach
maintainerPATCH v6 2/2 clocksource: driver for Conexant Digicolor SoC timer
In reply to Baruch SiachAdd clocksource driver to the Conexant CX92755 SoC, part of the Digicolor SoCs series. Hardware provides 8 timers, A to H. Timer A is dedicated to a future watchdog driver so we don't use it here. Use timer B for sched_clock, and timer C for clock_event.
--- drivers/clocksource/Kconfig | 3 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-digicolor.c | 199 ++++++++++++++++++++++++++++++++++ 3 files changed, 203 insertions(+) create mode 100644 drivers/clocksource/timer-digicolor.c
drivers/clocksource/Kconfig +3 -0
@@ -18,6 +18,9 @@ config CLKBLD_I8253 config CLKSRC_MMIO bool +config DIGICOLOR_TIMER + bool + config DW_APB_TIMER bool
drivers/clocksource/Makefile +1 -0
@@ -10,6 +10,7 @@ obj-$(CONFIG_SH_TIMER_TMU) += sh_tmu.o obj-$(CONFIG_EM_TIMER_STI) += em_sti.o obj-$(CONFIG_CLKBLD_I8253) += i8253.o obj-$(CONFIG_CLKSRC_MMIO) += mmio.o +obj-$(CONFIG_DIGICOLOR_TIMER) += timer-digicolor.o obj-$(CONFIG_DW_APB_TIMER) += dw_apb_timer.o obj-$(CONFIG_DW_APB_TIMER_OF) += dw_apb_timer_of.o obj-$(CONFIG_CLKSRC_NOMADIK_MTU) += nomadik-mtu.o
drivers/clocksource/timer-digicolor.c new file +199 -0
199 lines not on this page · raw message
Signature · 1 line
2.1.4
Hi Baruch,
applied the series for 3.20.
Thanks !
-- Daniel
Quoted 72 lines · Baruch Siach
This short series adds support for the Conexant CX92755 SoC timers. This SoC is part of the Conexant Digicolor series of SoCs.
v6:
* Use a dedicated config symbol,CONFIG_DIGICOLOR_TIMER, to enable the driver (Daniel Lezcano)v5:
http://thread.gmane.org/gmane.linux.kernel/1874237* Switch back to use
of_iomap(notof_io_request_and_map), as the watchdog driver also needs access to the same registers; add a comment clarifying thisAddress more review comments by Daniel Lezcano:
* Properly encapsulate the static objects for the
clock_eventcode* Use dc_timer_{disable,enable,set_count} accessors to make the code clearer
v4:
http://thread.gmane.org/gmane.linux.kernel/1874017Address review comments by Daniel Lezcano:
* Use macros for register configuration values
* Encapsulate static objects in a struct
* Use
of_io_request_and_mapto exclusively map registers* Use
UINT_MAXinstead of ~0* Use
request_irqinstead ofsetup_irq, obviating the need for a separate irqaction structv3:
http://article.gmane.org/gmane.linux.kernel/1870628 http://article.gmane.org/gmane.linux.kernel/1870627 * Split into a separate clocksource seriesv2:
http://article.gmane.org/gmane.linux.kernel/1861850
http://article.gmane.org/gmane.linux.kernel/1861853* Change the timer dt binding, so that the 'reg' property points to the first "Agent Communication" register. This should improve the chance of reusing this binding for other SoCs in this series.
* Add the
CONTROL()andCOUNT()macros to the timer driver to make the code clearer.* Move
arch/armKconfigchanges from the clocksource driver patch to the base arch support patch to reduce dependency between themv1:
http://article.gmane.org/gmane.linux.kernel/1855028 http://article.gmane.org/gmane.linux.kernel/1855025Baruch Siach (2):
clocksource: devicetree: document Conexant Digicolor timer binding
clocksource: driver for Conexant Digicolor SoC timer.../devicetree/bindings/timer/digicolor-timer.txt | 18 ++ drivers/clocksource/Kconfig | 3 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-digicolor.c | 199 +++++++++++++++++++++ 4 files changed, 221 insertions(+)create mode 100644
Documentation/devicetree/bindings/timer/digicolor-timer.txtcreate mode 100644drivers/clocksource/timer-digicolor.c
Signature · 5 lines
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog