Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] clk: spacemit: refactor common ccu driver
@ 2026-01-03  7:26 Yixun Lan
  2026-01-03  7:26 ` [PATCH v3 1/4] clk: spacemit: prepare common ccu header Yixun Lan
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Yixun Lan @ 2026-01-03  7:26 UTC (permalink / raw)
  To: Stephen Boyd, Michael Turquette, Philipp Zabel
  Cc: Alex Elder, Guodong Xu, Inochi Amaoto, linux-kernel, linux-clk,
	linux-riscv, spacemit, Yixun Lan, Yao Zi

The goal here is to refactor the clock driver to extract common part, and
reuse it, so in the future, we can maximize the source code usage once
adding new clock driver (specifically, for the SpacemiT K3 SoC here)

Since reset driver register via auxiliary bus which requires a adjustment
of the auxiliary device id accordingly.

This patch will depend on Kconfig fix for building modules [1], and the idea
come from K3 clock's review[2]

Please note, Patch 1 is needed for both clock and reset driver, so extract it
out as single independent patch. Then it can be pulled into both subsystem.

Link: https://lore.kernel.org/all/20251219012819.440972-1-inochiama@gmail.com/ [1]
Link: https://lore.kernel.org/all/aTo8sCPpVM1o9PKX@pie [2]
Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
Changes in v3:
- drop reset macro, and have separate patch for changing reset name
- extract common spacemit_ccu_probe(), leave SoC specific change out
- improve commit message
- Link to v2: https://lore.kernel.org/r/20251226-06-k1-clk-common-v2-0-28b59418b4df@gentoo.org

Changes in v2:
- extract common header file which shared by clock and reset
- add SoC namespace to differentiate reset for auxiliary bus
- Link to v1: https://lore.kernel.org/r/20251220-06-k1-clk-common-v1-0-df28a0a91621@gentoo.org

---
Yixun Lan (4):
      clk: spacemit: prepare common ccu header
      clk: spacemit: extract common ccu functions
      clk: spacemit: add platform SoC prefix to reset name
      reset: spacemit: fix auxiliary device id

 drivers/clk/spacemit/ccu-k1.c     | 191 +++-----------------------------------
 drivers/clk/spacemit/ccu_common.c | 171 ++++++++++++++++++++++++++++++++++
 drivers/clk/spacemit/ccu_common.h |  10 ++
 drivers/reset/reset-spacemit.c    |   2 +-
 include/soc/spacemit/ccu.h        |  21 +++++
 include/soc/spacemit/k1-syscon.h  |  12 +--
 6 files changed, 215 insertions(+), 192 deletions(-)
---
base-commit: 99735a742f7e9a3e7f4cb6c58edf1b38101e7657
change-id: 20251217-06-k1-clk-common-8d1c57995047
prerequisite-message-id: 20251219012819.440972-1-inochiama@gmail.com
prerequisite-patch-id: df430730ed961011cee5c5d47b7ace84b3c5ebb7
prerequisite-patch-id: 64003618c33be925602e46b7543f2c13d3f36474

Best regards,
-- 
Yixun Lan


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2026-01-08 12:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-03  7:26 [PATCH v3 0/4] clk: spacemit: refactor common ccu driver Yixun Lan
2026-01-03  7:26 ` [PATCH v3 1/4] clk: spacemit: prepare common ccu header Yixun Lan
2026-01-06 14:43   ` Alex Elder
2026-01-03  7:26 ` [PATCH v3 2/4] clk: spacemit: extract common ccu functions Yixun Lan
2026-01-06 14:43   ` Alex Elder
2026-01-06 22:27     ` Yixun Lan
2026-01-06 23:42       ` Alex Elder
2026-01-03  7:26 ` [PATCH v3 3/4] clk: spacemit: add platform SoC prefix to reset name Yixun Lan
2026-01-06 14:43   ` Alex Elder
2026-01-03  7:26 ` [PATCH v3 4/4] reset: spacemit: fix auxiliary device id Yixun Lan
2026-01-06 14:43   ` Alex Elder
2026-01-08 11:07     ` Philipp Zabel
2026-01-08 12:24       ` Yixun Lan

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