Skip to contentSkip to conversation

clk: thead: allow COMPILE_TEST builds

PATCH Superseded Rosen Penev 3 participants 3 messages Jun 29 – Jul 6 Common clk

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: thead: allow COMPILE_TEST builds

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
---
 drivers/clk/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/Makefile +1 -1
index 68145ad91035..d651e4ed3462 100644
@@ -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/
Signature · 1 line
2.54.0
#1 lore raw

Hi Rosen,

Quoted 21 lines · Rosen Penev

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
---
 drivers/clk/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/Makefile +0 -0
index 68145ad91035..d651e4ed3462 100644

drivers/clk/Makefile obj-$(CONFIG_ARCH_SUNXI) += sunxi/ · line 160

Quoted 5 lines
drivers/clk/Makefile +1 -1
@@ -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

#2 lore raw
Quoted 34 lines · Brian Masney

Hi Rosen,

Quoted 21 lines · Rosen Penev

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
---
 drivers/clk/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/Makefile +0 -0
index 68145ad91035..d651e4ed3462 100644

drivers/clk/Makefile obj-$(CONFIG_ARCH_SUNXI) += sunxi/ · line 160

Quoted 5 lines
drivers/clk/Makefile +1 -1
@@ -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?

Quoted 3 lines

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