Skip to content

timers: Add support for RZ/N1 SoCs timers

Herve Codina (Schneider Electric) linux-devicetree linux-renesas-soc lkml 7 versions – Applied

Status from this message: Applied, patch 1,2 and 4

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest4 patches 3 repliesApplied
  2. v64 patches 0 repliesSuperseded
  3. v54 patches 3 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v44 patches8 repliesSuperseded
v34 patches1 replySuperseded
v24 patches4 repliesSuperseded
v14 patches1 replySuperseded

Changes in v7 from the cover letter

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/4dt-bindings: timer: Add the Renesas RZ/N1 timerDocumentation/devicetree/bindings/timer/renesas,rzn1-timer.yaml+74 -00 replies
2/4clocksource/drivers: Add support for the Renesas RZ/N1 timersdrivers/clocksource/Kconfig drivers/clocksource/Makefile drivers/clocksource/timer-rzn1.c+495 -00 replies
3/4ARM: dts: r9a06g032: Add support for timersarch/arm/boot/dts/renesas/r9a06g032.dtsi+34 -01 reply
4/4MAINTAINERS: Add the Renesas RZ/N1 timers driver entryMAINTAINERS+7 -00 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchKrzysztof KozlowskiGeert UytterhoevenWolfram Sang
1/4R-b R-b R-b
2/4T-b
3/4R-b R-b T-b
4/4R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v7 thread

Cover letter [PATCH v7 0/4] timers: Add support for RZ/N1 SoCs timers

The Renesas RZ/N1 SoCs family has two timers block controller available.

Each controller is charge of 8 timers (six 16-bit timers + two 32-bit timers).

Each timer has its own interrupt, its own prescaler that can be used to divide the clock by 25 (timers block are fed with a 25 MHz clock) and all timers can work in either one-shot or periodic mode.

This series adds support for those timers blocks.

Best regards,
Hervé

Changes v6 -> v7
v6: https://lore.kernel.org/all/[email protected]/

Patch 2:
- Fix a NULL pointer dereference issue reported by Sashiko in rzn1_timer_interrupt() [0].
Even if the issue cannot be triggered with the hardware used, avoid the potential NULL pointer dereference in the code itself.
[0] https://lore.kernel.org/all/[email protected]/

Changes v5 -> v6
v5: https://lore.kernel.org/all/[email protected]/

Patch 2:
- Fix a comment
- Add 'Tested-by: Wolfram Sang'

Patch 1, 3 and 4:
No changes

Changes v4 -> v5
v4: https://lore.kernel.org/all/[email protected]/

Rebase on top of v7.3-rc1

Wolfram sent his 'Tested-by' tag for patch 2 in the v4 iteration but because of timers re-assignment done this v5, I haven't add his tag in patch 2.

Patch 1:
- Reduce the reg area size
- Add 'Reviewed-by: Wolfram Sang'

Patch 2:
- Take into account Shashiko's feedback and avoid paths which could lead to a NULL pointer dereference in the interrupt handle. Even if these paths cannot be reached with our hardware timers, remove them from the driver.
- Reassign timers usage for the first timers instance probed:
* First and second 16-bit timers: clock events per CPU
* Last (second one) 32-bit timer: clocksource and sched_clock
* Other timers: clock events for all possible CPUs

Patch 3:
- Reduce the reg area size
- Remove some empty lines in commit log
- Add 'Reviewed-by: Wolfram Sang'
- Add 'Tested-by: Wolfram Sang'

Patch 4:
- Add 'Reviewed-by: Wolfram Sang'.

Changes v3 -> v4
v3: https://lore.kernel.org/all/[email protected]/

Patches 1, 3 and 4:
No changes.

Patch 2:
Took into account Shashiko's feedback
- Remove CLOCK_SOURCE_SUSPEND_NONSTOP flag
- Fix CPU ids checks against number of 32-bit timers (avoid out-of-bound accesses)
- Enable IRQ in CPU hotpluig startup function
- Add CPU hotplug teardown function and disable IRQ in this function.
- Adapt probe() to avoid IRQ handled by CPU hotplug startup/teardown been enabled by default.

Changes v2 -> v3
v2: https://lore.kernel.org/all/[email protected]/

Rebase on top of v7.2-rc1.

Patch 1, 3 and 4:
- Add 'Reviewed-by: Geert Uytterhoeven'

Patch 2:
- Fix typos in commit log.
- Split Kconfig 'depends on' in 2 lines.
- Fix indentation, space and alignment in code.
- Fix dev_err_probe() conversion format.
- Introduce rzn1_timer_setup_timers() and rzn1_timer_register_clkevt() to avoid code duplication in rzn1_timer_probe_{first,other}()
- Add '.suppress_bind_attrs = true'.

Changes v1 -> v2
v1: https://lore.kernel.org/all/[email protected]/

Rebase on top of v7.1-rc1.

Patch 1:
- Drop minItems related to interrupts property
- Add 'Reviewed-by: Krzysztof Kozlowski'

Patches 2, 3 and 4:
No changes

Herve Codina (Schneider Electric) (4):
dt-bindings: timer: Add the Renesas RZ/N1 timer clocksource/drivers: Add support for the Renesas RZ/N1 timers
ARM: dts: r9a06g032: Add support for timers
MAINTAINERS: Add the Renesas RZ/N1 timers driver entry

 .../bindings/timer/renesas,rzn1-timer.yaml    |  74 +++
 MAINTAINERS                                   |   7 +
 arch/arm/boot/dts/renesas/r9a06g032.dtsi      |  34 ++
 drivers/clocksource/Kconfig                   |  11 +
 drivers/clocksource/Makefile                  |   1 +
 drivers/clocksource/timer-rzn1.c              | 483 ++++++++++++++++++
 6 files changed, 610 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/timer/renesas,rzn1-timer.yaml
 create mode 100644 drivers/clocksource/timer-rzn1.c
Signature · 1 line
2.55.0