mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] clk: nuvoton: ma35d1: Fix mux parenting and peripheral clock rates
@ 2026-09-21  6:44 Miquel Raynal
  2026-09-21  6:44 ` [PATCH v2 1/3] clk: nuvoton: ma35d1: Add missing WDT/WWDT parent clocks Miquel Raynal
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Miquel Raynal @ 2026-09-21  6:44 UTC (permalink / raw)
  To: Jacky Huang, Shan-Chun Hung, Michael Turquette, Stephen Boyd,
	Richard Cochran, Arnd Bergmann, Brian Masney, Jerome Brunet,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Thomas Petazzoni, Steam Lin, linux-arm-kernel, linux-clk,
	linux-kernel, Krzysztof Kozlowski, devicetree, Miquel Raynal,
	Jacky Huang, stable

I am in possession of an MA35D1 NuMaker board. The SPI controller has
been contributed, but at this stage it does not work with the current
clock driver.

The clock controller registers its muxes with .fw_name parent data,
which requires every internal clock name to be declared in the DT. As
the DT does not declare them, all parent lookups fail: muxes end up
registered as root clocks and most peripherals read a zero rate.

This conversion exposed an issue with the WDT/WWDT parents which were
actually missing in the clock driver. I am not using these clocks myself
but it is worth fixing.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Changes in v2:
- New patch 1/3: register the missing WDT/WWDT parent clocks
- New patch 3/3: harden the code
- Link to v1: https://lore.kernel.org/r/20260813-perso-ma35d1-upstream-clk-v1-1-e78e5e6172ea@bootlin.com

---
Miquel Raynal (3):
      clk: nuvoton: ma35d1: Add missing WDT/WWDT parent clocks
      clk: nuvoton: ma35d1: Use clk_hw pointers as mux parents
      clk: nuvoton: ma35d1: Avoid possible error pointer dereferencing

 drivers/clk/nuvoton/clk-ma35d1-divider.c       |   3 +
 drivers/clk/nuvoton/clk-ma35d1-pll.c           |   3 +
 drivers/clk/nuvoton/clk-ma35d1.c               | 637 ++++++++-----------------
 include/dt-bindings/clock/nuvoton,ma35d1-clk.h |   4 +-
 4 files changed, 197 insertions(+), 450 deletions(-)
---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260813-perso-ma35d1-upstream-clk-65cacfc1a86b

Best regards,
-- 
Miquel Raynal <miquel.raynal@bootlin.com>


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

end of thread, other threads:[~2026-09-25 13:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21  6:44 [PATCH v2 0/3] clk: nuvoton: ma35d1: Fix mux parenting and peripheral clock rates Miquel Raynal
2026-09-21  6:44 ` [PATCH v2 1/3] clk: nuvoton: ma35d1: Add missing WDT/WWDT parent clocks Miquel Raynal
2026-09-24 13:25   ` Krzysztof Kozlowski
2026-09-25 10:18     ` Miquel Raynal
2026-09-25 12:58       ` Krzysztof Kozlowski
2026-09-25 13:24         ` Miquel Raynal
2026-09-21  6:44 ` [PATCH v2 2/3] clk: nuvoton: ma35d1: Use clk_hw pointers as mux parents Miquel Raynal
2026-09-21  6:44 ` [PATCH v2 3/3] clk: nuvoton: ma35d1: Avoid possible error pointer dereferencing Miquel Raynal

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

all inboxes | Powered by JetHome®