[PATCH v4 0/2] clk: spacemit: Fix module build for spacemit common ccu driver

Inochi Amaoto posted 2 patches 1 month, 3 weeks ago
drivers/clk/spacemit/Kconfig      | 14 ++++++--------
drivers/clk/spacemit/Makefile     |  9 +++++++--
drivers/clk/spacemit/ccu-k1.c     |  1 +
drivers/clk/spacemit/ccu_common.c |  6 ++++++
drivers/clk/spacemit/ccu_ddn.c    |  1 +
drivers/clk/spacemit/ccu_mix.c    |  9 +++++++++
drivers/clk/spacemit/ccu_pll.c    |  1 +
7 files changed, 31 insertions(+), 10 deletions(-)
create mode 100644 drivers/clk/spacemit/ccu_common.c
[PATCH v4 0/2] clk: spacemit: Fix module build for spacemit common ccu driver
Posted by Inochi Amaoto 1 month, 3 weeks ago
Currently, the SPACEMIT_CCU entry is only a switch for enabling entry
SPACEMIT_K1_CCU. It does not guide the build for common clock codes
even if it is a tristate entry. This makes this entry useless.

Change the Makefile to add a separate build for common clock logic,
so the SPACEMIT_CCU entry takes effect, also add necessary
MODULE_LICENSE()/MODULE_DESCRIPTION()/EXPORT_SYMBOL() for the module
build.

This patch mostly fix the build problem, and it should serve as a
basic for the incoming K3 clock driver. See link.

Link: https://lore.kernel.org/all/20251217001833-GYE1903981@gentoo.org

Change from v3:
1. patch 1: change Makefile to trigger module build actually
2. patch 2: new patch for remove internal Kconfig entry

Change from v2:
1. change namespace name to CLK_SPACEMIT

Change from v1:
1. Use EXPORT_SYMBOL_NS_GPL to export clock ops

Inochi Amaoto (2):
  clk: spacemit: Respect Kconfig setting when building modules
  clk: spacemit: Hide common clock driver from user controller

 drivers/clk/spacemit/Kconfig      | 14 ++++++--------
 drivers/clk/spacemit/Makefile     |  9 +++++++--
 drivers/clk/spacemit/ccu-k1.c     |  1 +
 drivers/clk/spacemit/ccu_common.c |  6 ++++++
 drivers/clk/spacemit/ccu_ddn.c    |  1 +
 drivers/clk/spacemit/ccu_mix.c    |  9 +++++++++
 drivers/clk/spacemit/ccu_pll.c    |  1 +
 7 files changed, 31 insertions(+), 10 deletions(-)
 create mode 100644 drivers/clk/spacemit/ccu_common.c

--
2.52.0
Re: [PATCH v4 0/2] clk: spacemit: Fix module build for spacemit common ccu driver
Posted by Yixun Lan 1 month, 2 weeks ago
On Fri, 19 Dec 2025 09:28:16 +0800, Inochi Amaoto wrote:
> Currently, the SPACEMIT_CCU entry is only a switch for enabling entry
> SPACEMIT_K1_CCU. It does not guide the build for common clock codes
> even if it is a tristate entry. This makes this entry useless.
> 
> Change the Makefile to add a separate build for common clock logic,
> so the SPACEMIT_CCU entry takes effect, also add necessary
> MODULE_LICENSE()/MODULE_DESCRIPTION()/EXPORT_SYMBOL() for the module
> build.
> 
> [...]

Applied, thanks!

[1/2] clk: spacemit: Respect Kconfig setting when building modules
      https://github.com/spacemit-com/linux/commit/5ec8cbbc54c82c0bdae4dbf0e5aecf9817bde2b9
[2/2] clk: spacemit: Hide common clock driver from user controller
      https://github.com/spacemit-com/linux/commit/99735a742f7e9a3e7f4cb6c58edf1b38101e7657

Best regards,
-- 
Yixun Lan
Re: [PATCH v4 0/2] clk: spacemit: Fix module build for spacemit common ccu driver
Posted by Yixun Lan 1 month, 2 weeks ago
Hi Inochi, 

On 09:28 Fri 19 Dec     , Inochi Amaoto wrote:
> Currently, the SPACEMIT_CCU entry is only a switch for enabling entry
> SPACEMIT_K1_CCU. It does not guide the build for common clock codes
> even if it is a tristate entry. This makes this entry useless.
> 
> Change the Makefile to add a separate build for common clock logic,
> so the SPACEMIT_CCU entry takes effect, also add necessary
> MODULE_LICENSE()/MODULE_DESCRIPTION()/EXPORT_SYMBOL() for the module
> build.
> 
> This patch mostly fix the build problem, and it should serve as a
> basic for the incoming K3 clock driver. See link.
> 
> Link: https://lore.kernel.org/all/20251217001833-GYE1903981@gentoo.org
> 
this series looks good to me, so

Reviewed-by: Yixun Lan <dlan@gentoo.org>

-- 
Yixun Lan (dlan)