The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCHv2] clk: davinci: add COMPILE_TEST support
@ 2026-07-19 21:42 Rosen Penev
  2026-07-21 21:37 ` Brian Masney
  2026-07-22  0:03 ` David Lechner
  0 siblings, 2 replies; 3+ messages in thread
From: Rosen Penev @ 2026-07-19 21:42 UTC (permalink / raw)
  To: linux-clk
  Cc: Michael Turquette, Stephen Boyd, Brian Masney, David Lechner,
	open list

Add driver-scoped Kconfig symbols for the DaVinci clock drivers so they can
be built through COMPILE_TEST without selecting the ARM DaVinci platform
symbols.

Keep the existing ARM platform behavior by defaulting the new symbols from
the corresponding ARCH_DAVINCI symbols, and use the new symbols for the
davinci clock Makefile entries.

Assisted-by: Codex:GPT-5.5
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 v2: use COMMON_CLK prefix.
 drivers/clk/Kconfig          |  1 +
 drivers/clk/Makefile         |  2 +-
 drivers/clk/davinci/Kconfig  | 29 +++++++++++++++++++++++++++++
 drivers/clk/davinci/Makefile |  8 +++-----
 4 files changed, 34 insertions(+), 6 deletions(-)
 create mode 100644 drivers/clk/davinci/Kconfig

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 40e2451ee1d8..16191b297150 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -516,6 +516,7 @@ source "drivers/clk/actions/Kconfig"
 source "drivers/clk/analogbits/Kconfig"
 source "drivers/clk/aspeed/Kconfig"
 source "drivers/clk/bcm/Kconfig"
+source "drivers/clk/davinci/Kconfig"
 source "drivers/clk/eswin/Kconfig"
 source "drivers/clk/hisilicon/Kconfig"
 source "drivers/clk/imgtec/Kconfig"
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 087893f77bec..d90b15bb8e74 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -119,7 +119,7 @@ obj-$(CONFIG_ARCH_ARTPEC)		+= axis/
 obj-$(CONFIG_ARC_PLAT_AXS10X)		+= axs10x/
 obj-y					+= bcm/
 obj-$(CONFIG_ARCH_BERLIN)		+= berlin/
-obj-$(CONFIG_ARCH_DAVINCI)		+= davinci/
+obj-$(CONFIG_COMMON_CLK_DAVINCI)	+= davinci/
 obj-$(CONFIG_COMMON_CLK_ESWIN)		+= eswin/
 obj-$(CONFIG_ARCH_HISI)			+= hisilicon/
 obj-y					+= imgtec/
diff --git a/drivers/clk/davinci/Kconfig b/drivers/clk/davinci/Kconfig
new file mode 100644
index 000000000000..5bbe2b98db5d
--- /dev/null
+++ b/drivers/clk/davinci/Kconfig
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: GPL-2.0-only
+config COMMON_CLK_DAVINCI
+	bool "Clock drivers for TI DaVinci SoCs"
+	depends on ARCH_DAVINCI || COMPILE_TEST
+	depends on HAS_IOMEM
+	select REGMAP_MMIO
+	select RESET_CONTROLLER
+	default ARCH_DAVINCI
+	help
+	  Support for the clock controllers found on TI DaVinci SoCs.
+
+if COMMON_CLK_DAVINCI
+
+config COMMON_CLK_DAVINCI_DA8XX_CFGCHIP
+	bool "TI DA8xx CFGCHIP clock driver"
+	default ARCH_DAVINCI_DA8XX
+	help
+	  Support for the CFGCHIP clock gates found on TI DA8xx/OMAP-L13x
+	  SoCs.
+
+config COMMON_CLK_DAVINCI_DA850
+	bool "TI DA850/OMAP-L138/AM18x clock support"
+	select COMMON_CLK_DAVINCI_DA8XX_CFGCHIP
+	default ARCH_DAVINCI_DA850
+	help
+	  Support for the PLL and PSC clocks found on TI DA850/OMAP-L138/AM18x
+	  SoCs.
+
+endif
diff --git a/drivers/clk/davinci/Makefile b/drivers/clk/davinci/Makefile
index f9d5c9a392e4..4899cdf04bd6 100644
--- a/drivers/clk/davinci/Makefile
+++ b/drivers/clk/davinci/Makefile
@@ -1,11 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0
 
-ifeq ($(CONFIG_COMMON_CLK), y)
-obj-$(CONFIG_ARCH_DAVINCI_DA8XX)	+= da8xx-cfgchip.o
+obj-$(CONFIG_COMMON_CLK_DAVINCI_DA8XX_CFGCHIP)	+= da8xx-cfgchip.o
 
 obj-y += pll.o
-obj-$(CONFIG_ARCH_DAVINCI_DA850)	+= pll-da850.o
+obj-$(CONFIG_COMMON_CLK_DAVINCI_DA850)		+= pll-da850.o
 
 obj-y += psc.o
-obj-$(CONFIG_ARCH_DAVINCI_DA850)	+= psc-da850.o
-endif
+obj-$(CONFIG_COMMON_CLK_DAVINCI_DA850)		+= psc-da850.o
-- 
2.55.0


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

* Re: [PATCHv2] clk: davinci: add COMPILE_TEST support
  2026-07-19 21:42 [PATCHv2] clk: davinci: add COMPILE_TEST support Rosen Penev
@ 2026-07-21 21:37 ` Brian Masney
  2026-07-22  0:03 ` David Lechner
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Masney @ 2026-07-21 21:37 UTC (permalink / raw)
  To: Rosen Penev
  Cc: linux-clk, Michael Turquette, Stephen Boyd, David Lechner,
	open list

On Sun, Jul 19, 2026 at 02:42:14PM -0700, Rosen Penev wrote:
> Add driver-scoped Kconfig symbols for the DaVinci clock drivers so they can
> be built through COMPILE_TEST without selecting the ARM DaVinci platform
> symbols.
> 
> Keep the existing ARM platform behavior by defaulting the new symbols from
> the corresponding ARCH_DAVINCI symbols, and use the new symbols for the
> davinci clock Makefile entries.
> 
> Assisted-by: Codex:GPT-5.5
> Signed-off-by: Rosen Penev <rosenp@gmail.com>

Reviewed-by: Brian Masney <bmasney@redhat.com>


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

* Re: [PATCHv2] clk: davinci: add COMPILE_TEST support
  2026-07-19 21:42 [PATCHv2] clk: davinci: add COMPILE_TEST support Rosen Penev
  2026-07-21 21:37 ` Brian Masney
@ 2026-07-22  0:03 ` David Lechner
  1 sibling, 0 replies; 3+ messages in thread
From: David Lechner @ 2026-07-22  0:03 UTC (permalink / raw)
  To: Rosen Penev, linux-clk
  Cc: Michael Turquette, Stephen Boyd, Brian Masney, open list

On 7/19/26 4:42 PM, Rosen Penev wrote:
> Add driver-scoped Kconfig symbols for the DaVinci clock drivers so they can
> be built through COMPILE_TEST without selecting the ARM DaVinci platform
> symbols.
> 
> Keep the existing ARM platform behavior by defaulting the new symbols from
> the corresponding ARCH_DAVINCI symbols, and use the new symbols for the
> davinci clock Makefile entries.
> 
> Assisted-by: Codex:GPT-5.5
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  v2: use COMMON_CLK prefix.
>  drivers/clk/Kconfig          |  1 +
>  drivers/clk/Makefile         |  2 +-
>  drivers/clk/davinci/Kconfig  | 29 +++++++++++++++++++++++++++++
>  drivers/clk/davinci/Makefile |  8 +++-----
>  4 files changed, 34 insertions(+), 6 deletions(-)
>  create mode 100644 drivers/clk/davinci/Kconfig
> 
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 40e2451ee1d8..16191b297150 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -516,6 +516,7 @@ source "drivers/clk/actions/Kconfig"
>  source "drivers/clk/analogbits/Kconfig"
>  source "drivers/clk/aspeed/Kconfig"
>  source "drivers/clk/bcm/Kconfig"
> +source "drivers/clk/davinci/Kconfig"
>  source "drivers/clk/eswin/Kconfig"
>  source "drivers/clk/hisilicon/Kconfig"
>  source "drivers/clk/imgtec/Kconfig"
> diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> index 087893f77bec..d90b15bb8e74 100644
> --- a/drivers/clk/Makefile
> +++ b/drivers/clk/Makefile
> @@ -119,7 +119,7 @@ obj-$(CONFIG_ARCH_ARTPEC)		+= axis/
>  obj-$(CONFIG_ARC_PLAT_AXS10X)		+= axs10x/
>  obj-y					+= bcm/
>  obj-$(CONFIG_ARCH_BERLIN)		+= berlin/
> -obj-$(CONFIG_ARCH_DAVINCI)		+= davinci/
> +obj-$(CONFIG_COMMON_CLK_DAVINCI)	+= davinci/
>  obj-$(CONFIG_COMMON_CLK_ESWIN)		+= eswin/
>  obj-$(CONFIG_ARCH_HISI)			+= hisilicon/
>  obj-y					+= imgtec/
> diff --git a/drivers/clk/davinci/Kconfig b/drivers/clk/davinci/Kconfig
> new file mode 100644
> index 000000000000..5bbe2b98db5d
> --- /dev/null
> +++ b/drivers/clk/davinci/Kconfig
> @@ -0,0 +1,29 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +config COMMON_CLK_DAVINCI
> +	bool "Clock drivers for TI DaVinci SoCs"
> +	depends on ARCH_DAVINCI || COMPILE_TEST
> +	depends on HAS_IOMEM
> +	select REGMAP_MMIO
> +	select RESET_CONTROLLER
> +	default ARCH_DAVINCI
> +	help
> +	  Support for the clock controllers found on TI DaVinci SoCs.
> +
> +if COMMON_CLK_DAVINCI
> +
> +config COMMON_CLK_DAVINCI_DA8XX_CFGCHIP
> +	bool "TI DA8xx CFGCHIP clock driver"
> +	default ARCH_DAVINCI_DA8XX
> +	help
> +	  Support for the CFGCHIP clock gates found on TI DA8xx/OMAP-L13x
> +	  SoCs.
> +
> +config COMMON_CLK_DAVINCI_DA850
> +	bool "TI DA850/OMAP-L138/AM18x clock support"
> +	select COMMON_CLK_DAVINCI_DA8XX_CFGCHIP
> +	default ARCH_DAVINCI_DA850
> +	help
> +	  Support for the PLL and PSC clocks found on TI DA850/OMAP-L138/AM18x
> +	  SoCs.
> +
> +endif
> diff --git a/drivers/clk/davinci/Makefile b/drivers/clk/davinci/Makefile
> index f9d5c9a392e4..4899cdf04bd6 100644
> --- a/drivers/clk/davinci/Makefile
> +++ b/drivers/clk/davinci/Makefile
> @@ -1,11 +1,9 @@
>  # SPDX-License-Identifier: GPL-2.0
>  
> -ifeq ($(CONFIG_COMMON_CLK), y)
> -obj-$(CONFIG_ARCH_DAVINCI_DA8XX)	+= da8xx-cfgchip.o
> +obj-$(CONFIG_COMMON_CLK_DAVINCI_DA8XX_CFGCHIP)	+= da8xx-cfgchip.o
>  
>  obj-y += pll.o
> -obj-$(CONFIG_ARCH_DAVINCI_DA850)	+= pll-da850.o
> +obj-$(CONFIG_COMMON_CLK_DAVINCI_DA850)		+= pll-da850.o
>  
>  obj-y += psc.o
> -obj-$(CONFIG_ARCH_DAVINCI_DA850)	+= psc-da850.o
> -endif
> +obj-$(CONFIG_COMMON_CLK_DAVINCI_DA850)		+= psc-da850.o

Since ARCH_DAVINCI_DA850 is the only one left for ARCH_DAVINCI, I
don't think we really need the granularity of more Kconfig symbols.
Just adding COMMON_CLK_DAVINCI (or only COMMON_CLK_DAVINCI_DA850)
should be enough.


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

end of thread, other threads:[~2026-07-22  0:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-19 21:42 [PATCHv2] clk: davinci: add COMPILE_TEST support Rosen Penev
2026-07-21 21:37 ` Brian Masney
2026-07-22  0:03 ` David Lechner

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