clk: thead: allow COMPILE_TEST builds
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/
--- drivers/clk/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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/ obj-y += ti/ obj-$(CONFIG_CLK_UNIPHIER) += uniphier/ obj-$(CONFIG_ARCH_U8500) += ux500/
Signature · 1 line
2.54.0
Hi Rosen,
Quoted 21 lines · Rosen Penev
CLK_THEAD_TH1520_APalready allowsCOMPILE_TEST, but the parent clockMakefileonly descends intodrivers/clk/theadforARCH_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=loongarchdrivers/clk/thead/Assisted-by Codex:GPT-5.5Signed-off-by Rosen Penev <[email protected]>--- drivers/clk/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/Makefile +0
-0
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
Quoted 34 lines · Brian Masney
Hi Rosen,
Quoted 21 lines · Rosen Penev
CLK_THEAD_TH1520_APalready allowsCOMPILE_TEST, but the parent clockMakefileonly descends intodrivers/clk/theadforARCH_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=loongarchdrivers/clk/thead/Assisted-by Codex:GPT-5.5Signed-off-by Rosen Penev <[email protected]>--- drivers/clk/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/Makefile +0
-0drivers/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_APis the onlyKconfigdefined in the thead subdirectory. What about when/if someone adds a secondKconfig, 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