mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master] clk: ti-sci: fix build failure without TI_SCI_PROTOCOL
Date: Mon,  4 Dec 2023 17:52:38 +0100	[thread overview]
Message-ID: <20231204165238.1131311-1-a.fatoum@pengutronix.de> (raw)

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




             reply	other threads:[~2023-12-04 16:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 16:52 Ahmad Fatoum [this message]
2023-12-05  8:18 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231204165238.1131311-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox