linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] clk: thead: th1520-ap: allow gate cascade and fix padctrl0
@ 2025-08-13 17:11 Icenowy Zheng
  2025-08-13 17:11 ` [PATCH 1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate Icenowy Zheng
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Icenowy Zheng @ 2025-08-13 17:11 UTC (permalink / raw)
  To: Drew Fustini, Guo Ren, Fu Wei, Michael Turquette, Stephen Boyd
  Cc: Michal Wilczynski, Yao Zi, Han Gao, linux-riscv, linux-clk,
	linux-kernel, Icenowy Zheng

Current ccu_gate implementation does not easily allow gates to be clock
parents because of the waste of struct clk_hw in struct ccu_gate;
however it's found that the padctrl0 apb clock gate seems to be
downstream of perisys-apb4-hclk, gating the latter w/o gating the former
makes the padctrl0 registers inaccessible too.

Fix this by refactor ccu_gate code, mimicing what Yao Zi did on
ccu_mux; and then assign perisys-apb4-hclk as parent of padctrl0 bus
gate.

This patchset depends on the display clock patchset at [1], although a
rebasing to get rid of this dependency is possible.

[1] https://lore.kernel.org/linux-riscv/20250813072702.2176993-1-uwu@icenowy.me/

Icenowy Zheng (2):
  clk: thead: th1520-ap: describe gate clocks with clk_gate
  clk: thead: th1520-ap: fix parent of padctrl0 clock

 drivers/clk/thead/clk-th1520-ap.c | 385 +++++++++++++++---------------
 1 file changed, 188 insertions(+), 197 deletions(-)

-- 
2.50.1


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

end of thread, other threads:[~2025-08-16 23:16 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-13 17:11 [PATCH 0/2] clk: thead: th1520-ap: allow gate cascade and fix padctrl0 Icenowy Zheng
2025-08-13 17:11 ` [PATCH 1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate Icenowy Zheng
2025-08-14  3:12   ` Guo Ren
2025-08-14  5:02     ` Icenowy Zheng
2025-08-14  6:41       ` Guo Ren
2025-08-14  6:47         ` Icenowy Zheng
2025-08-15 23:45   ` Drew Fustini
2025-08-16  8:11   ` Troy Mitchell
2025-08-16 23:16     ` Drew Fustini
2025-08-13 17:11 ` [PATCH 2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock Icenowy Zheng
2025-08-14  3:08   ` Guo Ren
2025-08-14  5:03     ` Icenowy Zheng
2025-08-15 23:45   ` Drew Fustini
2025-08-16  8:01   ` Troy Mitchell
2025-08-13 17:16 ` [PATCH 0/2] clk: thead: th1520-ap: allow gate cascade and fix padctrl0 Icenowy Zheng
2025-08-14  3:10   ` Guo Ren
2025-08-15 23:28   ` Drew Fustini

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).