From: Rosen Penev <rosenp@gmail.com>
To: linux-clk@vger.kernel.org
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney@redhat.com>,
David Lechner <david@lechnology.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCHv3] clk: davinci: add COMPILE_TEST support
Date: Wed, 12 Aug 2026 11:40:01 -0700 [thread overview]
Message-ID: <20260812184001.75093-1-rosenp@gmail.com> (raw)
Add a driver-scoped Kconfig symbol for the DaVinci clock drivers so
they can be built through COMPILE_TEST without selecting the ARM
DaVinci platform symbols.
Keep the existing ARM platform behavior by defaulting the new symbol
from ARCH_DAVINCI, and use it for the davinci clock Makefile entries.
ARCH_DAVINCI_DA850 is the only remaining DaVinci platform symbol, so a
single COMMON_CLK_DAVINCI symbol suffices; the whole directory builds
together just fine.
Assisted-by: Codex:GPT-5.5
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
---
v3: remove pointless symbols for single user.
v2: use COMMON_CLK prefix.
drivers/clk/Kconfig | 1 +
drivers/clk/Makefile | 2 +-
drivers/clk/davinci/Kconfig | 10 ++++++++++
drivers/clk/davinci/Makefile | 8 +++-----
4 files changed, 15 insertions(+), 6 deletions(-)
create mode 100644 drivers/clk/davinci/Kconfig
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index fe68534e7b04..cb69872401fd 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -518,6 +518,7 @@ source "drivers/clk/actions/Kconfig"
source "drivers/clk/analogbits/Kconfig"
source "drivers/clk/aspeed/Kconfig"
source "drivers/clk/bcm/Kconfig"
+source "drivers/clk/davinci/Kconfig"
source "drivers/clk/eswin/Kconfig"
source "drivers/clk/hisilicon/Kconfig"
source "drivers/clk/imgtec/Kconfig"
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 26f15cfdd6b2..d7f9dedde011 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -119,7 +119,7 @@ obj-$(CONFIG_ARCH_ARTPEC) += axis/
obj-$(CONFIG_ARC_PLAT_AXS10X) += axs10x/
obj-y += bcm/
obj-$(CONFIG_ARCH_BERLIN) += berlin/
-obj-$(CONFIG_ARCH_DAVINCI) += davinci/
+obj-$(CONFIG_COMMON_CLK_DAVINCI) += davinci/
obj-$(CONFIG_COMMON_CLK_ESWIN) += eswin/
obj-$(CONFIG_COMMON_CLK_HISI) += hisilicon/
obj-y += imgtec/
diff --git a/drivers/clk/davinci/Kconfig b/drivers/clk/davinci/Kconfig
new file mode 100644
index 000000000000..7b8c518ef6b4
--- /dev/null
+++ b/drivers/clk/davinci/Kconfig
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0-only
+config COMMON_CLK_DAVINCI
+ bool "Clock drivers for TI DaVinci SoCs"
+ depends on ARCH_DAVINCI || COMPILE_TEST
+ depends on HAS_IOMEM
+ select REGMAP_MMIO
+ select RESET_CONTROLLER
+ default ARCH_DAVINCI
+ help
+ Support for the clock controllers found on TI DaVinci SoCs.
diff --git a/drivers/clk/davinci/Makefile b/drivers/clk/davinci/Makefile
index f9d5c9a392e4..7cb030b5e046 100644
--- a/drivers/clk/davinci/Makefile
+++ b/drivers/clk/davinci/Makefile
@@ -1,11 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
-ifeq ($(CONFIG_COMMON_CLK), y)
-obj-$(CONFIG_ARCH_DAVINCI_DA8XX) += da8xx-cfgchip.o
+obj-y += da8xx-cfgchip.o
obj-y += pll.o
-obj-$(CONFIG_ARCH_DAVINCI_DA850) += pll-da850.o
+obj-y += pll-da850.o
obj-y += psc.o
-obj-$(CONFIG_ARCH_DAVINCI_DA850) += psc-da850.o
-endif
+obj-y += psc-da850.o
--
2.55.0
reply other threads:[~2026-08-12 18:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260812184001.75093-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=bmasney@redhat.com \
--cc=david@lechnology.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.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