* [PATCHv2 0/2] clk: stm32: fix COMPILE_TEST builds
@ 2026-07-19 21:50 Rosen Penev
2026-07-19 21:50 ` [PATCHv2 1/2] clk: stm32: add missing bitfield.h header Rosen Penev
2026-07-19 21:50 ` [PATCHv2 2/2] clk: stm32: allow STM32MP COMPILE_TEST builds Rosen Penev
0 siblings, 2 replies; 5+ messages in thread
From: Rosen Penev @ 2026-07-19 21:50 UTC (permalink / raw)
To: linux-clk
Cc: Michael Turquette, Stephen Boyd, Brian Masney, Maxime Coquelin,
Alexandre Torgue, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Gabriel Fernandez, Nicolas Le Bayon,
Alok Tiwari, open list, moderated list:ARM/STM32 ARCHITECTURE,
moderated list:ARM/STM32 ARCHITECTURE,
open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b
The STM32MP clock drivers have COMPILE_TEST in their Kconfig depends, but
they fail to build (and are not even compiled) when ARCH_STM32 is disabled.
The first patch adds a missing bitfield.h include so the drivers build
standalone, and the second wires up the Makefile gate to the STM32MP clock
symbol so the directory is actually traversed under COMPILE_TEST.
v2: split up in two patches.
Rosen Penev (2):
clk: stm32: add missing bitfield.h header
clk: stm32: allow STM32MP COMPILE_TEST builds
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(-)
--
2.55.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCHv2 1/2] clk: stm32: add missing bitfield.h header
2026-07-19 21:50 [PATCHv2 0/2] clk: stm32: fix COMPILE_TEST builds Rosen Penev
@ 2026-07-19 21:50 ` Rosen Penev
2026-07-20 20:00 ` Brian Masney
2026-07-19 21:50 ` [PATCHv2 2/2] clk: stm32: allow STM32MP COMPILE_TEST builds Rosen Penev
1 sibling, 1 reply; 5+ messages in thread
From: Rosen Penev @ 2026-07-19 21:50 UTC (permalink / raw)
To: linux-clk
Cc: Michael Turquette, Stephen Boyd, Brian Masney, Maxime Coquelin,
Alexandre Torgue, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Gabriel Fernandez, Nicolas Le Bayon,
Alok Tiwari, open list, moderated list:ARM/STM32 ARCHITECTURE,
moderated list:ARM/STM32 ARCHITECTURE,
open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b
It seems some ARM header includes this and the build passes there, but
nowhere else. Note that the driver has COMPILE_TEST in depends.
Fixes: 37ae8501cdb0 ("clk: stm32: introduce clocks for STM32MP21 platfor")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/clk/stm32/clk-stm32mp21.c | 1 +
drivers/clk/stm32/clk-stm32mp25.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/clk/stm32/clk-stm32mp21.c b/drivers/clk/stm32/clk-stm32mp21.c
index c8a37b716bd5..bdb17419908c 100644
--- a/drivers/clk/stm32/clk-stm32mp21.c
+++ b/drivers/clk/stm32/clk-stm32mp21.c
@@ -4,6 +4,7 @@
* Author: Gabriel Fernandez <gabriel.fernandez@foss.st.com> for STMicroelectronics.
*/
+#include <linux/bitfield.h>
#include <linux/bus/stm32_firewall_device.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
diff --git a/drivers/clk/stm32/clk-stm32mp25.c b/drivers/clk/stm32/clk-stm32mp25.c
index 52f0e8a12926..eb0bc918ecee 100644
--- a/drivers/clk/stm32/clk-stm32mp25.c
+++ b/drivers/clk/stm32/clk-stm32mp25.c
@@ -4,6 +4,7 @@
* Author: Gabriel Fernandez <gabriel.fernandez@foss.st.com> for STMicroelectronics.
*/
+#include <linux/bitfield.h>
#include <linux/bus/stm32_firewall_device.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCHv2 2/2] clk: stm32: allow STM32MP COMPILE_TEST builds
2026-07-19 21:50 [PATCHv2 0/2] clk: stm32: fix COMPILE_TEST builds Rosen Penev
2026-07-19 21:50 ` [PATCHv2 1/2] clk: stm32: add missing bitfield.h header Rosen Penev
@ 2026-07-19 21:50 ` Rosen Penev
2026-07-20 20:01 ` Brian Masney
1 sibling, 1 reply; 5+ messages in thread
From: Rosen Penev @ 2026-07-19 21:50 UTC (permalink / raw)
To: linux-clk
Cc: Michael Turquette, Stephen Boyd, Brian Masney, Maxime Coquelin,
Alexandre Torgue, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Gabriel Fernandez, Nicolas Le Bayon,
Alok Tiwari, open list, moderated list:ARM/STM32 ARCHITECTURE,
moderated list:ARM/STM32 ARCHITECTURE,
open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b
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.
Tested with:
make LLVM=1 ARCH=loongarch drivers/clk/stm32/
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 8383f9f1da51..bbcedf5d60ea 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -151,7 +151,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/
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCHv2 1/2] clk: stm32: add missing bitfield.h header
2026-07-19 21:50 ` [PATCHv2 1/2] clk: stm32: add missing bitfield.h header Rosen Penev
@ 2026-07-20 20:00 ` Brian Masney
0 siblings, 0 replies; 5+ messages in thread
From: Brian Masney @ 2026-07-20 20:00 UTC (permalink / raw)
To: Rosen Penev
Cc: linux-clk, Michael Turquette, Stephen Boyd, Maxime Coquelin,
Alexandre Torgue, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Gabriel Fernandez, Nicolas Le Bayon,
Alok Tiwari, open list, moderated list:ARM/STM32 ARCHITECTURE,
moderated list:ARM/STM32 ARCHITECTURE,
open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b
On Sun, Jul 19, 2026 at 02:50:39PM -0700, Rosen Penev wrote:
> It seems some ARM header includes this and the build passes there, but
> nowhere else. Note that the driver has COMPILE_TEST in depends.
>
> Fixes: 37ae8501cdb0 ("clk: stm32: introduce clocks for STM32MP21 platfor")
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCHv2 2/2] clk: stm32: allow STM32MP COMPILE_TEST builds
2026-07-19 21:50 ` [PATCHv2 2/2] clk: stm32: allow STM32MP COMPILE_TEST builds Rosen Penev
@ 2026-07-20 20:01 ` Brian Masney
0 siblings, 0 replies; 5+ messages in thread
From: Brian Masney @ 2026-07-20 20:01 UTC (permalink / raw)
To: Rosen Penev
Cc: linux-clk, Michael Turquette, Stephen Boyd, Maxime Coquelin,
Alexandre Torgue, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Gabriel Fernandez, Nicolas Le Bayon,
Alok Tiwari, open list, moderated list:ARM/STM32 ARCHITECTURE,
moderated list:ARM/STM32 ARCHITECTURE,
open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b
On Sun, Jul 19, 2026 at 02:50:40PM -0700, Rosen Penev wrote:
> 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.
>
> Tested with:
> make LLVM=1 ARCH=loongarch drivers/clk/stm32/
>
> Assisted-by: Codex:GPT-5.5
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-07-20 20:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-19 21:50 [PATCHv2 0/2] clk: stm32: fix COMPILE_TEST builds Rosen Penev
2026-07-19 21:50 ` [PATCHv2 1/2] clk: stm32: add missing bitfield.h header Rosen Penev
2026-07-20 20:00 ` Brian Masney
2026-07-19 21:50 ` [PATCHv2 2/2] clk: stm32: allow STM32MP COMPILE_TEST builds Rosen Penev
2026-07-20 20:01 ` Brian Masney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox