mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master] clk: ti-sci: fix build failure without TI_SCI_PROTOCOL
@ 2023-12-04 16:52 Ahmad Fatoum
  2023-12-05  8:18 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-12-04 16:52 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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@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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-05  8:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-04 16:52 [PATCH master] clk: ti-sci: fix build failure without TI_SCI_PROTOCOL Ahmad Fatoum
2023-12-05  8:18 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox