[PATCH master] clk: ti-sci: fix build failure without TI_SCI_PROTOCOL

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Dec 4 08:52:38 PST 2023


The SCI clk driver has an unconditional reference to
ti_sci_get_handle(), but no dependency is specific in the Kconfig.
Add a dependency and change defaults, so it's enabled by default.

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

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 076e77c8590f..a3772ed56d2a 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -38,6 +38,15 @@ config COMMON_CLK_SCMI
 	  This driver uses SCMI Message Protocol to interact with the
 	  firmware providing all the clock controls.
 
+config TI_SCI_CLK
+	tristate "TI System Control Interface clock drivers"
+	depends on TI_SCI_PROTOCOL
+	default ARCH_K3
+	help
+	  This adds the clock driver support over TI System Control Interface.
+	  If you wish to use clock resources from the PMMC firmware, say Y.
+	  Otherwise, say N.
+
 config COMMON_CLK_GPIO
 	bool
 	default y
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 3ebafbf7fdad..3a2983c0a030 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -29,4 +29,4 @@ obj-$(CONFIG_MACH_RPI_COMMON)	+= clk-rpi.o
 obj-y				+= bcm/
 obj-$(CONFIG_COMMON_CLK_SCMI)	+= clk-scmi.o
 obj-$(CONFIG_COMMON_CLK_GPIO)   += clk-gpio.o
-obj-$(CONFIG_ARCH_K3)		+= ti-sci-clk.o
+obj-$(CONFIG_TI_SCI_CLK)	+= ti-sci-clk.o
diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
index ee91b2b7fa6d..e37099aa6141 100644
--- a/drivers/firmware/Kconfig
+++ b/drivers/firmware/Kconfig
@@ -46,6 +46,7 @@ config QEMU_FW_CFG
 config TI_SCI_PROTOCOL
 	bool "TI System Control Interface (TISCI) Message Protocol"
 	depends on TI_MESSAGE_MANAGER
+	default ARCH_K3
 	help
 	  TI System Control Interface (TISCI) Message Protocol is used to manage
 	  compute systems such as ARM, DSP etc with the system controller in
-- 
2.39.2




More information about the barebox mailing list