clk: stm32: allow STM32MP COMPILE_TEST builds
Subsystems (2)
PATCH 1/1 clk: stm32: allow STM32MP COMPILE_TEST builds
COMMON_CLK_STM32MP already allows COMPILE_TEST, but the parent clock Makefile only descends into drivers/clk/stm32 for ARCH_STM32. Use the STM32MP clock symbol for that directory gate instead.
Building the STM32MP21 and STM32MP25 clock drivers then requires direct linux/bitfield.h includes for FIELD_GET(), so add them as part of exposing that compile-test coverage.
Tested with:
make LLVM=1 ARCH=loongarch drivers/clk/stm32/
--- drivers/clk/Makefile | 2 +- drivers/clk/stm32/clk-stm32mp21.c | 1 + drivers/clk/stm32/clk-stm32mp25.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)
drivers/clk/Makefile +1 -1
@@ -150,7 +150,7 @@ obj-y += spacemit/ obj-$(CONFIG_PLAT_SPEAR) += spear/ obj-y += sprd/ obj-$(CONFIG_ARCH_STI) += st/ -obj-$(CONFIG_ARCH_STM32) += stm32/ +obj-$(CONFIG_COMMON_CLK_STM32MP) += stm32/ obj-y += starfive/ obj-$(CONFIG_ARCH_SUNXI) += sunxi/ obj-y += sunxi-ng/
drivers/clk/stm32/clk-stm32mp21.c +1 -0
@@ -5,6 +5,7 @@*/ #include <linux/bus/stm32_firewall_device.h> +#include <linux/bitfield.h> #include <linux/clk-provider.h> #include <linux/io.h> #include <linux/platform_device.h>
drivers/clk/stm32/clk-stm32mp25.c +1 -0
@@ -5,6 +5,7 @@*/ #include <linux/bus/stm32_firewall_device.h> +#include <linux/bitfield.h> #include <linux/clk-provider.h> #include <linux/io.h> #include <linux/platform_device.h>
Signature · 1 line
2.54.0
Hi Rosen,
Quoted 7 lines · Rosen Penev
COMMON_CLK_STM32MPalready allowsCOMPILE_TEST, but the parent clockMakefileonly descends intodrivers/clk/stm32forARCH_STM32. Use the STM32MP clock symbol for that directory gate instead.Building the STM32MP21 and STM32MP25 clock drivers then requires direct
linux/bitfield.hincludes forFIELD_GET(), so add them as part of exposing that compile-test coverage.
The second one needs to be it's own separate patch, along with a Fixes tag.
Brian
Quoted 52 lines
Tested with:
make LLVM=1 ARCH=loongarchdrivers/clk/stm32/Assisted-by Codex:GPT-5.5Signed-off-by Rosen Penev <[email protected]>--- drivers/clk/Makefile | 2 +- drivers/clk/stm32/clk-stm32mp21.c | 1 + drivers/clk/stm32/clk-stm32mp25.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)drivers/clk/Makefile +1
-1@@ -150,7 +150,7 @@ obj-y += spacemit/ obj-$(CONFIG_PLAT_SPEAR) += spear/ obj-y += sprd/ obj-$(CONFIG_ARCH_STI) += st/ -obj-$(CONFIG_ARCH_STM32) += stm32/ +obj-$(CONFIG_COMMON_CLK_STM32MP) += stm32/ obj-y += starfive/ obj-$(CONFIG_ARCH_SUNXI) += sunxi/ obj-y += sunxi-ng/drivers/clk/stm32/clk-stm32mp21.c +1
-0@@ -5,6 +5,7 @@*/ #include <linux/bus/stm32_firewall_device.h> +#include <linux/bitfield.h> #include <linux/clk-provider.h> #include <linux/io.h> #include <linux/platform_device.h> drivers/clk/stm32/clk-stm32mp25.c +1
-0@@ -5,6 +5,7 @@*/ #include <linux/bus/stm32_firewall_device.h> +#include <linux/bitfield.h> #include <linux/clk-provider.h> #include <linux/io.h> #include <linux/platform_device.h> Signature · 1 line
2.54.0