Devicetree
 help / color / mirror / Atom feed
* [PATCH v6 0/5] clocksource/timer-econet-en751221: Support irq number per timer
@ 2026-05-28 14:00 Caleb James DeLisle
  2026-05-28 14:00 ` [PATCH v6 1/5] clocksource/timer-econet-en751221: fix refcount leak Caleb James DeLisle
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Caleb James DeLisle @ 2026-05-28 14:00 UTC (permalink / raw)
  To: linux-mips
  Cc: conor+dt, daniel.lezcano, devicetree, krzk+dt, linux-kernel,
	naseefkm, robh, tglx, grandmaster, Caleb James DeLisle

This timer appears on both the EcoNet EN751221 (34Kc) and on the
EN751627 / EN7528 (1004Kc) SoCs. On the 34Kc the interrupt controller
uses a percpu interrupt while on the others it uses an individual
IRQ number for each CPU timer. Add support for EN751627 and EN7528.
Add support for IRQ number for each CPU timer under the
econet,en751627-timer compatible.

Changes since v5:
* Integrate patch fix refcount leak from:
Link: https://lore.kernel.org/linux-mips/20260526184105.18962-3-grandmaster@al2klimov.de/
* NULL econet_timer.membase after unmapping
* NULL check dev->event_handler in case clockevents_config_and_register
  failed to fully register.
* v5: https://lore.kernel.org/linux-mips/20260516233943.49502-1-cjd@cjdns.fr/

Changes from v4:
* Fixed incorrect compatible in DT schema
* Bracing in out_irq_free if statement
* I did not move cpuhp_setup_state past the point of no return
* v4: https://lore.kernel.org/linux-mips/20260516215720.4160831-1-cjd@cjdns.fr

Changes from v3:
* off-by-one in out_irq_free
* Gracefully fail if too many address resources are provided in the DT
* Allow fewer actual timers than num_possible_cpus, as long as they
never start
* v3: https://lore.kernel.org/linux-mips/20260516182648.3987792-1-cjd@cjdns.fr

v3 note:

I decided to take this patchset in a slightly different direction from
v2. There is a certain amount of initialization that once it has run,
it cannot be reverted in case of error. The original driver init was a
mixture of revertible and non-revertible code which made it too easy
for code which is designed with best practices in mind to in fact
introduce a bug. Therefore I start by making the init process more
legible but without any business logic changes, then fix a race
condition by keeping IRQ disabled until after cevt is setup, then
finally add non-percpu IRQ support.

* v2: https://lore.kernel.org/linux-mips/20260514000601.3430262-1-cjd@cjdns.fr

Changes from v1:
* Split changes over 3 refactoring patches + main patch
* Remove driver discussion from dt commit message
* v1: https://lore.kernel.org/linux-mips/20260416175101.958073-1-cjd@cjdns.fr/

Alexander A. Klimov (1):
  clocksource/timer-econet-en751221: fix refcount leak

Caleb James DeLisle (4):
  dt-bindings: timer: econet: Update EN751627 for multi-IRQ
  clocksource/timer-econet-en751221: Init teardown on error if possible
  clocksource/timer-econet-en751221: Disable IRQ until cevt registered
  clocksource/timer-econet-en751221: Support EN751627 without percpu IRQ

 .../bindings/timer/econet,en751221-timer.yaml |  31 +--
 drivers/clocksource/timer-econet-en751221.c   | 181 ++++++++++++++----
 2 files changed, 159 insertions(+), 53 deletions(-)


base-commit: c8d32a0389fb97873285327ef4543a1431e54733
-- 
2.39.5


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-05-29 10:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-28 14:00 [PATCH v6 0/5] clocksource/timer-econet-en751221: Support irq number per timer Caleb James DeLisle
2026-05-28 14:00 ` [PATCH v6 1/5] clocksource/timer-econet-en751221: fix refcount leak Caleb James DeLisle
2026-05-28 14:00 ` [PATCH v6 2/5] dt-bindings: timer: econet: Update EN751627 for multi-IRQ Caleb James DeLisle
2026-05-28 14:45   ` sashiko-bot
2026-05-28 15:28     ` Caleb James DeLisle
2026-05-28 14:00 ` [PATCH v6 3/5] clocksource/timer-econet-en751221: Init teardown on error if possible Caleb James DeLisle
2026-05-28 15:23   ` sashiko-bot
2026-05-28 15:46     ` Caleb James DeLisle
2026-05-28 14:00 ` [PATCH v6 4/5] clocksource/timer-econet-en751221: Disable IRQ until cevt registered Caleb James DeLisle
2026-05-28 16:03   ` sashiko-bot
2026-05-28 14:00 ` [PATCH v6 5/5] clocksource/timer-econet-en751221: Support EN751627 without percpu IRQ Caleb James DeLisle
2026-05-28 16:41   ` sashiko-bot
2026-05-29 10:45     ` Caleb James DeLisle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox