]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: spacemit: extract common ccu functions
authorYixun Lan <dlan@gentoo.org>
Fri, 19 Dec 2025 00:07:23 +0000 (08:07 +0800)
committerYixun Lan <dlan@gentoo.org>
Fri, 9 Jan 2026 02:00:37 +0000 (10:00 +0800)
commit99669468d24ce21be12f3751e7381c47ab2c9ecd
tree0d2fea3c2499b25a30355ed388a4b0eacd6a6250
parentb61571fdefc4faa9dd5bb5b49ee7d10dc3719780
clk: spacemit: extract common ccu functions

Refactor the probe function of SpacemiT's clock, and extract a common ccu
file, so new clock driver added in the future can share the same code,
which would lower the burden of maintenance. Since this commit changes the
module name from spacemit_ccu_k1 to spacemit_ccu where the auxiliary device
registered, the auxiliary device id need to be adjusted. Idea of the patch
comes from the review of K3 clock driver, please refer to this disucssion[1]
for more detail.

This change will introduce a runtime break to reset driver, and will be
fixed in follow-up commit:
ecff77f7c041 ("reset: spacemit: fix auxiliary device id")

Link: https://lore.kernel.org/all/aTo8sCPpVM1o9PKX@pie/
Link: https://lore.kernel.org/r/20260108-06-k1-clk-common-v4-2-badf635993d3@gentoo.org
Suggested-by: Yao Zi <me@ziyao.cc>
Reviewed-by: Alex Elder <elder@riscstar.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
drivers/clk/spacemit/ccu-k1.c
drivers/clk/spacemit/ccu_common.c
drivers/clk/spacemit/ccu_common.h