[PATCH 01/13] clk: stm32mp1: build only when STM32MP15 support is enabled

Ahmad Fatoum a.fatoum at pengutronix.de
Sun Nov 26 22:49:35 PST 2023


The stm32mp1 clock driver is only used on the STM32MP15 and won't be
reused for the STM32MP13, so let's make it dependent on ARCH_STM32MP157
instead of CONFIG_ARCH_STM32MP.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/clk/Kconfig  | 5 +++++
 drivers/clk/Makefile | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 076e77c8590f..a7b8709cd72c 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -28,6 +28,11 @@ config COMMON_CLK_STM32F
 	help
 	  Support for stm32f4 and stm32f7 SoC families clocks
 
+config COMMON_CLK_STM32MP157
+	def_bool ARCH_STM32MP157
+	help
+	  Support for stm32mp157 SoC family clocks
+
 config COMMON_CLK_SCMI
 	tristate "Clock driver controlled via SCMI interface"
 	depends on ARM_SCMI_PROTOCOL || COMPILE_TEST
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 3ebafbf7fdad..6b08dc065444 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -17,7 +17,7 @@ obj-$(CONFIG_SOC_QCA_AR9331)	+= clk-ar933x.o
 obj-$(CONFIG_SOC_QCA_AR9344)	+= clk-ar9344.o
 obj-$(CONFIG_ARCH_IMX)		+= imx/
 obj-$(CONFIG_COMMON_CLK_AT91)	+= at91/
-obj-$(CONFIG_ARCH_STM32MP)	+= clk-stm32mp1.o
+obj-$(CONFIG_COMMON_CLK_STM32MP157)	+= clk-stm32mp1.o
 obj-$(CONFIG_MACH_VEXPRESS)	+= vexpress/
 obj-$(CONFIG_MACH_MIPS_LOONGSON)+= loongson/
 obj-$(CONFIG_ARCH_LAYERSCAPE)	+= clk-qoric.o
-- 
2.39.2




More information about the barebox mailing list