linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Fix orphan clocks in clk-th1520-ap driver
@ 2025-07-10  9:21 Yao Zi
  2025-07-10  9:21 ` [PATCH v2 1/2] clk: thead: th1520-ap: Correctly refer the parent of osc_12m Yao Zi
  2025-07-10  9:21 ` [PATCH v2 2/2] clk: thead: th1520-ap: Correctly refer the parent of c910-i0 Yao Zi
  0 siblings, 2 replies; 7+ messages in thread
From: Yao Zi @ 2025-07-10  9:21 UTC (permalink / raw)
  To: Drew Fustini, Guo Ren, Fu Wei, Michael Turquette, Stephen Boyd,
	Jisheng Zhang, Yangtao Li
  Cc: linux-riscv, linux-clk, linux-kernel, Yao Zi

clk_orphan_dump shows two suspicious orphan clocks on TH1520 when
booting the kernel with mainline U-Boot,

        $ cat /sys/kernel/debug/clk/clk_orphan_dump | jq 'keys'
        [
          "c910",
          "osc_12m"
        ]

where the correct parents should be c910-i0 for c910, and osc_24m for
osc_12m.

Note that the c910's case cannot be reproduced with vendor U-Boot,
which always reparents c910 to its second parent, cpu-pll1. Another way
to confirm the bug is to examine
/sys/kernel/debug/clk/c910/clk_possible_parents, which obviously doesn't
match c910's definition.

This series corrects the parent description of these two clocks to
eliminate the orphans.

Changed from v1
- Split the two fixes into separate patches
- Add a static qualifier for the new definition of osc_12m
- Link to v1: https://lore.kernel.org/all/20250705052028.24611-1-ziyao@disroot.org/

Thanks for your time and review.

Yao Zi (2):
  clk: thead: th1520-ap: Correctly refer the parent of osc_12m
  clk: thead: th1520-ap: Correctly refer the parent of c910-i0

 drivers/clk/thead/clk-th1520-ap.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

-- 
2.50.0


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

end of thread, other threads:[~2025-07-13 19:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-10  9:21 [PATCH v2 0/2] Fix orphan clocks in clk-th1520-ap driver Yao Zi
2025-07-10  9:21 ` [PATCH v2 1/2] clk: thead: th1520-ap: Correctly refer the parent of osc_12m Yao Zi
2025-07-10 21:00   ` Drew Fustini
2025-07-13 19:57     ` Drew Fustini
2025-07-10  9:21 ` [PATCH v2 2/2] clk: thead: th1520-ap: Correctly refer the parent of c910-i0 Yao Zi
2025-07-11  8:52   ` Drew Fustini
2025-07-12  0:39     ` Yao Zi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).