Linux clock framework development
 help / color / mirror / Atom feed
* [PATCH] clk: thead: allow COMPILE_TEST builds
@ 2026-06-29  3:28 Rosen Penev
  2026-07-06 17:20 ` Brian Masney
  0 siblings, 1 reply; 3+ messages in thread
From: Rosen Penev @ 2026-06-29  3:28 UTC (permalink / raw)
  To: linux-clk
  Cc: Michael Turquette, Stephen Boyd, Brian Masney, Nathan Chancellor,
	Nick Desaulniers, Bill Wendling, Justin Stitt, open list,
	open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b

CLK_THEAD_TH1520_AP already allows COMPILE_TEST, but the parent clock
Makefile only descends into drivers/clk/thead for ARCH_THEAD.  Use the
TH1520 AP clock symbol for the directory gate instead.

This lets the driver build on other 64-bit architectures selected for
compile testing without selecting the T-HEAD platform.

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

Assisted-by: Codex:GPT-5.5
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/clk/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 68145ad91035..d651e4ed3462 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -157,7 +157,7 @@ obj-$(CONFIG_ARCH_SUNXI)		+= sunxi/
 obj-y					+= sunxi-ng/
 obj-$(CONFIG_CLK_TEGRA)			+= tegra/
 obj-y					+= tenstorrent/
-obj-$(CONFIG_ARCH_THEAD)		+= thead/
+obj-$(CONFIG_CLK_THEAD_TH1520_AP)	+= thead/
 obj-y					+= ti/
 obj-$(CONFIG_CLK_UNIPHIER)		+= uniphier/
 obj-$(CONFIG_ARCH_U8500)		+= ux500/
-- 
2.54.0


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

* Re: [PATCH] clk: thead: allow COMPILE_TEST builds
  2026-06-29  3:28 [PATCH] clk: thead: allow COMPILE_TEST builds Rosen Penev
@ 2026-07-06 17:20 ` Brian Masney
  2026-07-06 20:32   ` Drew Fustini
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Masney @ 2026-07-06 17:20 UTC (permalink / raw)
  To: Rosen Penev
  Cc: linux-clk, Michael Turquette, Stephen Boyd, Nathan Chancellor,
	Nick Desaulniers, Bill Wendling, Justin Stitt, open list,
	open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b

Hi Rosen,

On Sun, Jun 28, 2026 at 08:28:14PM -0700, Rosen Penev wrote:
> CLK_THEAD_TH1520_AP already allows COMPILE_TEST, but the parent clock
> Makefile only descends into drivers/clk/thead for ARCH_THEAD.  Use the
> TH1520 AP clock symbol for the directory gate instead.
> 
> This lets the driver build on other 64-bit architectures selected for
> compile testing without selecting the T-HEAD platform.
> 
> Tested with:
> make LLVM=1 ARCH=loongarch drivers/clk/thead/
> 
> Assisted-by: Codex:GPT-5.5
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  drivers/clk/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> index 68145ad91035..d651e4ed3462 100644
> --- a/drivers/clk/Makefile
> +++ b/drivers/clk/Makefile
> @@ -157,7 +157,7 @@ obj-$(CONFIG_ARCH_SUNXI)		+= sunxi/
>  obj-y					+= sunxi-ng/
>  obj-$(CONFIG_CLK_TEGRA)			+= tegra/
>  obj-y					+= tenstorrent/
> -obj-$(CONFIG_ARCH_THEAD)		+= thead/
> +obj-$(CONFIG_CLK_THEAD_TH1520_AP)	+= thead/

Right now, CLK_THEAD_TH1520_AP is the only Kconfig defined in the thead
subdirectory. What about when/if someone adds a second Kconfig, and
that's the only one that's enabled?

Would it be better to have this as obj-y?

Brian


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

* Re: [PATCH] clk: thead: allow COMPILE_TEST builds
  2026-07-06 17:20 ` Brian Masney
@ 2026-07-06 20:32   ` Drew Fustini
  0 siblings, 0 replies; 3+ messages in thread
From: Drew Fustini @ 2026-07-06 20:32 UTC (permalink / raw)
  To: Brian Masney
  Cc: Rosen Penev, linux-clk, Michael Turquette, Stephen Boyd,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
	open list,
	open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b

On Mon, Jul 06, 2026 at 01:20:53PM -0400, Brian Masney wrote:
> Hi Rosen,
> 
> On Sun, Jun 28, 2026 at 08:28:14PM -0700, Rosen Penev wrote:
> > CLK_THEAD_TH1520_AP already allows COMPILE_TEST, but the parent clock
> > Makefile only descends into drivers/clk/thead for ARCH_THEAD.  Use the
> > TH1520 AP clock symbol for the directory gate instead.
> > 
> > This lets the driver build on other 64-bit architectures selected for
> > compile testing without selecting the T-HEAD platform.
> > 
> > Tested with:
> > make LLVM=1 ARCH=loongarch drivers/clk/thead/
> > 
> > Assisted-by: Codex:GPT-5.5
> > Signed-off-by: Rosen Penev <rosenp@gmail.com>
> > ---
> >  drivers/clk/Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> > index 68145ad91035..d651e4ed3462 100644
> > --- a/drivers/clk/Makefile
> > +++ b/drivers/clk/Makefile
> > @@ -157,7 +157,7 @@ obj-$(CONFIG_ARCH_SUNXI)		+= sunxi/
> >  obj-y					+= sunxi-ng/
> >  obj-$(CONFIG_CLK_TEGRA)			+= tegra/
> >  obj-y					+= tenstorrent/
> > -obj-$(CONFIG_ARCH_THEAD)		+= thead/
> > +obj-$(CONFIG_CLK_THEAD_TH1520_AP)	+= thead/
> 
> Right now, CLK_THEAD_TH1520_AP is the only Kconfig defined in the thead
> subdirectory. What about when/if someone adds a second Kconfig, and
> that's the only one that's enabled?
> 
> Would it be better to have this as obj-y?
> 
> Brian

I think obj-y would make sense. AP is just one of several TH1520 SoC
subsystems with a clock controller. Support may some day be added for
the other controllers.

Thanks,
Drew

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

end of thread, other threads:[~2026-07-06 20:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-29  3:28 [PATCH] clk: thead: allow COMPILE_TEST builds Rosen Penev
2026-07-06 17:20 ` Brian Masney
2026-07-06 20:32   ` Drew Fustini

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