[PATCH 2/8] clk: at91: sam9x60-pll: allow building under COMPILE_TEST and fix the build
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Aug 31 12:35:49 PDT 2026
From: Ahmad Fatoum <a.fatoum at barebox.org>
HAVE_AT91_SAM9X60_PLL is only selected by SOC_SAM9X60 and SOC_SAMA7G5,
which no board selects, so the driver has never been compiled and
doesn't build:
clk-sam9x60-pll.c:78:17: error: implicit declaration of function 'DIV_ROUND_CLOSEST_ULL'
clk-sam9x60-pll.c:201:16: error: implicit declaration of function 'mult_frac'
clk-sam9x60-pll.c:442:28: error: implicit declaration of function 'abs'
clk-sam9x60-pll.c:483:20: error: implicit declaration of function 'DIV_ROUND_CLOSEST'
Include the missing headers and give the symbol a COMPILE_TEST prompt.
Fixes: 18afc26f9caa ("clk: at91: port Linux v5.6 SAM9X60 (new ARM926EJ-S) clock support")
Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
arch/arm/mach-at91/Kconfig | 2 +-
drivers/clk/at91/clk-sam9x60-pll.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index db79ad2d267a..df20943254a9 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -44,7 +44,7 @@ config HAVE_AT91_I2S_MUX_CLK
bool
config HAVE_AT91_SAM9X60_PLL
- bool
+ bool "SAM9X60 PLL support" if COMPILE_TEST
config HAVE_AT91_SDRAMC
bool
diff --git a/drivers/clk/at91/clk-sam9x60-pll.c b/drivers/clk/at91/clk-sam9x60-pll.c
index c4f16061288f..4a1843e06c00 100644
--- a/drivers/clk/at91/clk-sam9x60-pll.c
+++ b/drivers/clk/at91/clk-sam9x60-pll.c
@@ -9,6 +9,8 @@
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include <linux/clk/at91_pmc.h>
+#include <linux/math.h>
+#include <linux/math64.h>
#include <of.h>
#include <mfd/syscon.h>
#include <linux/regmap.h>
--
2.47.3
More information about the barebox
mailing list