clocksource: npcm: add NPCM7xx timer driver
Tomer Maimon
maintainerv2 cover clocksource: npcm: add NPCM7xx timer driver
Changes since version 1:
- Update GPL licence message
This patch set adds clocksource support for the Nuvoton NPCM7xx Baseboard Management Controller (BMC).
The clocksource Enable 24-bit TIMER0 and TIMER1 counters in the NPCM7xx BMC, while TIMER0 serves as clockevent and TIMER1 serves as clocksource.
Tomer Maimon (2):
dt-binding: timer: document NPCM7xx timer DT bindings
clocksource: npcm: add NPCM7xx timer driver
.../bindings/timer/nuvoton,npcm7xx-timer.txt | 25 +++ drivers/clocksource/Kconfig | 8 + drivers/clocksource/Makefile | 1 + drivers/clocksource/npcm7xx-timer.c | 238 +++++++++++++++++++++ 4 files changed, 272 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.txt create mode 100644 drivers/clocksource/npcm7xx-timer.c
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH v2 1/2 dt-binding: timer: document NPCM7xx timer DT bindings
Added device tree binding documentation for Nuvoton NPCM7xx timer.
--- .../bindings/timer/nuvoton,npcm7xx-timer.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.txt
Documentation/devicetree/bindings/timer/nuvoton,npcm7xx-timer.txt new file +25 -0
@@ -0,0 +1,25 @@ +Nuvoton NPCM7xx timer + +Nuvoton NPCM7xx have three timer modules, each timer module provides five 24-bit +timer counters. + +Required properties: +- compatible : "nuvoton,npcm750-timer" for Poleg NPCM750. +- reg : Offset and length of the register set for the device. +- interrupts : Contain the timer interrupt with flags for + falling edge. + +Required clocking property, have to be one of: +- clocks : phandle of timer reference clock. +- clock-frequency : The frequency in Hz of the clock that drives the NPCM7xx + timer (usually 25000000). + +Example: + +timer@f0008000 { + compatible = "nuvoton,npcm750-timer"; + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; + reg = <0xf0008000 0x1000>; + clocks = <&clk NPCM7XX_CLK_TIMER>; +}; +
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH v2 2/2 clocksource: npcm: add NPCM7xx timer driver
In reply to Tomer MaimonAdd Nuvoton BMC NPCM7xx timer driver.
the clocksource Enable 24-bit TIMER0 and TIMER1 counters, while TIMER0 serves as clockevent and TIMER1 serves as clocksource.
--- drivers/clocksource/Kconfig | 8 ++ drivers/clocksource/Makefile | 1 + drivers/clocksource/npcm7xx-timer.c | 238 ++++++++++++++++++++++++++++++++++++ 3 files changed, 247 insertions(+) create mode 100644 drivers/clocksource/npcm7xx-timer.c
drivers/clocksource/Kconfig +8 -0
@@ -140,6 +140,14 @@ config VT8500_TIMER help Enables support for the VT8500 driver. +config NPCM7XX_TIMER + bool "NPCM7xx timer driver" if COMPILE_TEST + depends on HAS_IOMEM + select CLKSRC_MMIO + help + Enable 24-bit TIMER0 and TIMER1 counters in the NPCM7xx arcithcture, + While TIMER0 serves as clockevent and TIMER1 serves as clocksource. + config CADENCE_TTC_TIMER bool "Cadence TTC timer driver" if COMPILE_TEST depends on COMMON_CLK
drivers/clocksource/Makefile +1 -0
@@ -53,6 +53,7 @@ obj-$(CONFIG_CLKSRC_TI_32K) += timer-ti-32k.o obj-$(CONFIG_CLKSRC_NPS) += timer-nps.o obj-$(CONFIG_OXNAS_RPS_TIMER) += timer-oxnas-rps.o obj-$(CONFIG_OWL_TIMER) += owl-timer.o +obj-$(CONFIG_NPCM7XX_TIMER) += npcm7xx-timer.o obj-$(CONFIG_ARC_TIMERS) += arc_timer.o obj-$(CONFIG_ARM_ARCH_TIMER) += arm_arch_timer.o
drivers/clocksource/npcm7xx-timer.c new file +238 -0
238 lines not on this page · raw message
Signature · 1 line
2.14.1