The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] clk: mmp: allow COMPILE_TEST builds
@ 2026-07-19 21:43 Rosen Penev
  2026-07-20 14:46 ` Duje Mihanović
  0 siblings, 1 reply; 4+ messages in thread
From: Rosen Penev @ 2026-07-19 21:43 UTC (permalink / raw)
  To: linux-clk
  Cc: Michael Turquette, Stephen Boyd, Brian Masney,
	Duje Mihanović, Nathan Chancellor, Nick Desaulniers,
	Bill Wendling, Justin Stitt, open list,
	moderated list:ARM/Marvell PXA1908 SOC support,
	open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b

The MMP clock directory is only entered for ARCH_MMP, even though the
PXA1908 and MMP2 audio clock symbols can already be selected for
COMPILE_TEST.

Add a hidden MMP clock family gate, select it from the compile-testable MMP
clock symbols, and use that symbol for the parent Makefile descent.  Keep
ARCH_MMP as the default provider for existing platform builds.

Tested with:
make LLVM=1 ARCH=loongarch drivers/clk/mmp/

Assisted-by: Codex:GPT-5.5
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/clk/Kconfig     | 2 ++
 drivers/clk/Makefile    | 2 +-
 drivers/clk/mmp/Kconfig | 5 +++++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 16191b297150..cb69872401fd 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -457,12 +457,14 @@ config COMMON_CLK_STM32H7
 
 config COMMON_CLK_MMP2
 	def_bool COMMON_CLK && (MACH_MMP2_DT || MACH_MMP3_DT)
+	select COMMON_CLK_MMP
 	help
 	  Support for Marvell MMP2 and MMP3 SoC clocks
 
 config COMMON_CLK_MMP2_AUDIO
         tristate "Clock driver for MMP2 Audio subsystem"
         depends on COMMON_CLK_MMP2 || COMPILE_TEST
+        select COMMON_CLK_MMP
         help
           This driver supports clocks for Audio subsystem on MMP2 SoC.
 
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 4b2c089f46a1..8383f9f1da51 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -130,7 +130,7 @@ obj-y					+= mediatek/
 obj-$(CONFIG_ARCH_MESON)		+= meson/
 obj-y					+= microchip/
 ifeq ($(CONFIG_COMMON_CLK), y)
-obj-$(CONFIG_ARCH_MMP)			+= mmp/
+obj-$(CONFIG_COMMON_CLK_MMP)		+= mmp/
 endif
 obj-y					+= mstar/
 obj-y					+= mvebu/
diff --git a/drivers/clk/mmp/Kconfig b/drivers/clk/mmp/Kconfig
index b0d2fea3cda5..35a069034b28 100644
--- a/drivers/clk/mmp/Kconfig
+++ b/drivers/clk/mmp/Kconfig
@@ -1,10 +1,15 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
+config COMMON_CLK_MMP
+	bool
+	default ARCH_MMP
+
 config COMMON_CLK_PXA1908
 	bool "Clock driver for Marvell PXA1908"
 	depends on ARCH_MMP || COMPILE_TEST
 	depends on OF
 	default y if ARCH_MMP && ARM64
+	select COMMON_CLK_MMP
 	select AUXILIARY_BUS
 	help
 	  This driver supports the Marvell PXA1908 SoC clocks.
-- 
2.55.0


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

* Re: [PATCH] clk: mmp: allow COMPILE_TEST builds
  2026-07-19 21:43 [PATCH] clk: mmp: allow COMPILE_TEST builds Rosen Penev
@ 2026-07-20 14:46 ` Duje Mihanović
  2026-07-20 20:08   ` Brian Masney
  0 siblings, 1 reply; 4+ messages in thread
From: Duje Mihanović @ 2026-07-20 14:46 UTC (permalink / raw)
  To: linux-clk, Rosen Penev
  Cc: Michael Turquette, Stephen Boyd, Brian Masney, Nathan Chancellor,
	Nick Desaulniers, Bill Wendling, Justin Stitt, open list,
	moderated list:ARM/Marvell PXA1908 SOC support,
	open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b

On Sunday, 19 July 2026 23:43:49 Central European Summer Time Rosen Penev 
wrote:

[...]

> diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> index 4b2c089f46a1..8383f9f1da51 100644
> --- a/drivers/clk/Makefile
> +++ b/drivers/clk/Makefile
> @@ -130,7 +130,7 @@ obj-y					+= 
mediatek/
>  obj-$(CONFIG_ARCH_MESON)		+= meson/
>  obj-y					+= microchip/
>  ifeq ($(CONFIG_COMMON_CLK), y)
> -obj-$(CONFIG_ARCH_MMP)			+= mmp/
> +obj-$(CONFIG_COMMON_CLK_MMP)		+= mmp/

Could it be possible to select mmp unconditionally, like most of the other 
subtrees are? AFAICT, that would also require creating new Kconfig symbols for 
the PXA168, PXA910 and PXA1928 clocks, but I suspect it may be the more proper 
choice in the long term.

Regards,
--
Duje



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

* Re: [PATCH] clk: mmp: allow COMPILE_TEST builds
  2026-07-20 14:46 ` Duje Mihanović
@ 2026-07-20 20:08   ` Brian Masney
  2026-07-21  1:04     ` Rosen Penev
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Masney @ 2026-07-20 20:08 UTC (permalink / raw)
  To: Duje Mihanović
  Cc: linux-clk, Rosen Penev, Michael Turquette, Stephen Boyd,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
	open list, moderated list:ARM/Marvell PXA1908 SOC support,
	open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b

Hi Duje,

On Mon, Jul 20, 2026 at 04:46:40PM +0200, Duje Mihanović wrote:
> On Sunday, 19 July 2026 23:43:49 Central European Summer Time Rosen Penev 
> wrote:
> 
> [...]
> 
> > diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> > index 4b2c089f46a1..8383f9f1da51 100644
> > --- a/drivers/clk/Makefile
> > +++ b/drivers/clk/Makefile
> > @@ -130,7 +130,7 @@ obj-y					+= 
> mediatek/
> >  obj-$(CONFIG_ARCH_MESON)		+= meson/
> >  obj-y					+= microchip/
> >  ifeq ($(CONFIG_COMMON_CLK), y)
> > -obj-$(CONFIG_ARCH_MMP)			+= mmp/
> > +obj-$(CONFIG_COMMON_CLK_MMP)		+= mmp/
> 
> Could it be possible to select mmp unconditionally, like most of the other 
> subtrees are? AFAICT, that would also require creating new Kconfig symbols for 
> the PXA168, PXA910 and PXA1928 clocks, but I suspect it may be the more proper 
> choice in the long term.

Just by sheer numbers, the CONFIG_COMMON_CLK_XXX approach is the most
common use case right now.

    x1:~/src/linux/linux-next ((next-20260720) %)$ grep "CONFIG_COMMON_CLK" drivers/clk/Makefile | grep "+=" | wc -l
    68
    x1:~/src/linux/linux-next ((next-20260720) %)$ grep "obj-y" drivers/clk/Makefile | wc -l
    25

I have no strong opinions about this either way other than to drive
consistency across various drivers as much as possible.

Currently the mmp directory currently only has COMMON_CLK_PXA1908
defined. When the other PXA* drivers are introduced, will there be a
CONFIG_COMMON_CLK_MMA_COMMON that all of the drivers will use?

If so, we could put that MMA_COMMON in the toplevel clk Makefile.

If not, then yes I agree that obj-y will be fine.

Brian


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

* Re: [PATCH] clk: mmp: allow COMPILE_TEST builds
  2026-07-20 20:08   ` Brian Masney
@ 2026-07-21  1:04     ` Rosen Penev
  0 siblings, 0 replies; 4+ messages in thread
From: Rosen Penev @ 2026-07-21  1:04 UTC (permalink / raw)
  To: Brian Masney
  Cc: Duje Mihanović, linux-clk, Michael Turquette, Stephen Boyd,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
	open list, moderated list:ARM/Marvell PXA1908 SOC support,
	open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b

On Mon, Jul 20, 2026 at 1:08 PM Brian Masney <bmasney@redhat.com> wrote:
>
> Hi Duje,
>
> On Mon, Jul 20, 2026 at 04:46:40PM +0200, Duje Mihanović wrote:
> > On Sunday, 19 July 2026 23:43:49 Central European Summer Time Rosen Penev
> > wrote:
> >
> > [...]
> >
> > > diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> > > index 4b2c089f46a1..8383f9f1da51 100644
> > > --- a/drivers/clk/Makefile
> > > +++ b/drivers/clk/Makefile
> > > @@ -130,7 +130,7 @@ obj-y                                   +=
> > mediatek/
> > >  obj-$(CONFIG_ARCH_MESON)           += meson/
> > >  obj-y                                      += microchip/
> > >  ifeq ($(CONFIG_COMMON_CLK), y)
> > > -obj-$(CONFIG_ARCH_MMP)                     += mmp/
> > > +obj-$(CONFIG_COMMON_CLK_MMP)               += mmp/
> >
> > Could it be possible to select mmp unconditionally, like most of the other
> > subtrees are? AFAICT, that would also require creating new Kconfig symbols for
> > the PXA168, PXA910 and PXA1928 clocks, but I suspect it may be the more proper
> > choice in the long term.
>
> Just by sheer numbers, the CONFIG_COMMON_CLK_XXX approach is the most
> common use case right now.
It's much simpler this way.
>
>     x1:~/src/linux/linux-next ((next-20260720) %)$ grep "CONFIG_COMMON_CLK" drivers/clk/Makefile | grep "+=" | wc -l
>     68
>     x1:~/src/linux/linux-next ((next-20260720) %)$ grep "obj-y" drivers/clk/Makefile | wc -l
>     25
>
> I have no strong opinions about this either way other than to drive
> consistency across various drivers as much as possible.
>
> Currently the mmp directory currently only has COMMON_CLK_PXA1908
> defined. When the other PXA* drivers are introduced, will there be a
> CONFIG_COMMON_CLK_MMA_COMMON that all of the drivers will use?
>
> If so, we could put that MMA_COMMON in the toplevel clk Makefile.
>
> If not, then yes I agree that obj-y will be fine.
>
> Brian
>

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

end of thread, other threads:[~2026-07-21  1:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-19 21:43 [PATCH] clk: mmp: allow COMPILE_TEST builds Rosen Penev
2026-07-20 14:46 ` Duje Mihanović
2026-07-20 20:08   ` Brian Masney
2026-07-21  1:04     ` Rosen Penev

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