Skip to contentSkip to conversation

clk: davinci: add COMPILE_TEST support

PATCH Superseded Rosen Penev 4 participants 4 messages Jul 19 – Aug 11

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 clk: davinci: add COMPILE_TEST support

Add driver-scoped Kconfig symbols 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 symbols from the corresponding ARCH_DAVINCI symbols, and use the new symbols for the davinci clock Makefile entries.

Assisted-by Codex:GPT-5.5

---
v2: use COMMON_CLK prefix.

 drivers/clk/Kconfig          |  1 +
 drivers/clk/Makefile         |  2 +-
 drivers/clk/davinci/Kconfig  | 29 +++++++++++++++++++++++++++++
 drivers/clk/davinci/Makefile |  8 +++-----
 4 files changed, 34 insertions(+), 6 deletions(-)
 create mode 100644 drivers/clk/davinci/Kconfig
drivers/clk/Kconfig +1 -0
index 40e2451ee1d8..16191b297150 100644
@@ -516,6 +516,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"
drivers/clk/Makefile +1 -1
index 087893f77bec..d90b15bb8e74 100644
@@ -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_ARCH_HISI)			+= hisilicon/
 obj-y					+= imgtec/
drivers/clk/davinci/Kconfig new file +29 -0
new file mode 100644
index 000000000000..5bbe2b98db5d
@@ -0,0 +1,29 @@
+# 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.
+
+if COMMON_CLK_DAVINCI
+
+config COMMON_CLK_DAVINCI_DA8XX_CFGCHIP
+	bool "TI DA8xx CFGCHIP clock driver"
+	default ARCH_DAVINCI_DA8XX
+	help
+	  Support for the CFGCHIP clock gates found on TI DA8xx/OMAP-L13x
+	  SoCs.
+
+config COMMON_CLK_DAVINCI_DA850
+	bool "TI DA850/OMAP-L138/AM18x clock support"
+	select COMMON_CLK_DAVINCI_DA8XX_CFGCHIP
+	default ARCH_DAVINCI_DA850
+	help
+	  Support for the PLL and PSC clocks found on TI DA850/OMAP-L138/AM18x
+	  SoCs.
+
+endif
drivers/clk/davinci/Makefile +3 -5
index f9d5c9a392e4..4899cdf04bd6 100644
@@ -1,11 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0
 
-ifeq ($(CONFIG_COMMON_CLK), y)
-obj-$(CONFIG_ARCH_DAVINCI_DA8XX)	+= da8xx-cfgchip.o
+obj-$(CONFIG_COMMON_CLK_DAVINCI_DA8XX_CFGCHIP)	+= da8xx-cfgchip.o
 
 obj-y += pll.o
-obj-$(CONFIG_ARCH_DAVINCI_DA850)	+= pll-da850.o
+obj-$(CONFIG_COMMON_CLK_DAVINCI_DA850)		+= pll-da850.o
 
 obj-y += psc.o
-obj-$(CONFIG_ARCH_DAVINCI_DA850)	+= psc-da850.o
-endif
+obj-$(CONFIG_COMMON_CLK_DAVINCI_DA850)		+= psc-da850.o
Signature · 1 line
2.55.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Rosen Penev

Add driver-scoped Kconfig symbols 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 symbols from the corresponding ARCH_DAVINCI symbols, and use the new symbols for the davinci clock Makefile entries.

Assisted-by Codex:GPT-5.5
maintainer
#2 lore raw
In reply to Rosen Penev
Quoted 88 lines · Rosen Penev

Add driver-scoped Kconfig symbols 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 symbols from the corresponding ARCH_DAVINCI symbols, and use the new symbols for the davinci clock Makefile entries.

Assisted-by Codex:GPT-5.5

---
v2: use COMMON_CLK prefix.

 drivers/clk/Kconfig          |  1 +
 drivers/clk/Makefile         |  2 +-
 drivers/clk/davinci/Kconfig  | 29 +++++++++++++++++++++++++++++
 drivers/clk/davinci/Makefile |  8 +++-----
 4 files changed, 34 insertions(+), 6 deletions(-)
 create mode 100644 drivers/clk/davinci/Kconfig
drivers/clk/Kconfig +1 -0
index 40e2451ee1d8..16191b297150 100644
@@ -516,6 +516,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"
drivers/clk/Makefile +1 -1
index 087893f77bec..d90b15bb8e74 100644
@@ -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_ARCH_HISI)			+= hisilicon/
 obj-y					+= imgtec/
drivers/clk/davinci/Kconfig new file +29 -0
new file mode 100644
index 000000000000..5bbe2b98db5d
@@ -0,0 +1,29 @@
+# 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.
+
+if COMMON_CLK_DAVINCI
+
+config COMMON_CLK_DAVINCI_DA8XX_CFGCHIP
+	bool "TI DA8xx CFGCHIP clock driver"
+	default ARCH_DAVINCI_DA8XX
+	help
+	  Support for the CFGCHIP clock gates found on TI DA8xx/OMAP-L13x
+	  SoCs.
+
+config COMMON_CLK_DAVINCI_DA850
+	bool "TI DA850/OMAP-L138/AM18x clock support"
+	select COMMON_CLK_DAVINCI_DA8XX_CFGCHIP
+	default ARCH_DAVINCI_DA850
+	help
+	  Support for the PLL and PSC clocks found on TI DA850/OMAP-L138/AM18x
+	  SoCs.
+
+endif
drivers/clk/davinci/Makefile +0 -2
index f9d5c9a392e4..4899cdf04bd6 100644
@@ -1,11 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0
 
-ifeq ($(CONFIG_COMMON_CLK), y)
-obj-$(CONFIG_ARCH_DAVINCI_DA8XX)	+= da8xx-cfgchip.o

drivers/clk/davinci/Makefile line 9

Quoted 10 lines
drivers/clk/davinci/Makefile +3 -3
+obj-$(CONFIG_COMMON_CLK_DAVINCI_DA8XX_CFGCHIP)	+= da8xx-cfgchip.o
 
 obj-y += pll.o
-obj-$(CONFIG_ARCH_DAVINCI_DA850)	+= pll-da850.o
+obj-$(CONFIG_COMMON_CLK_DAVINCI_DA850)		+= pll-da850.o
 
 obj-y += psc.o
-obj-$(CONFIG_ARCH_DAVINCI_DA850)	+= psc-da850.o
-endif
+obj-$(CONFIG_COMMON_CLK_DAVINCI_DA850)		+= psc-da850.o

Since ARCH_DAVINCI_DA850 is the only one left for ARCH_DAVINCI, I don't think we really need the granularity of more Kconfig symbols. Just adding COMMON_CLK_DAVINCI (or only COMMON_CLK_DAVINCI_DA850) should be enough.

#3 lore raw
In reply to Rosen Penev
kernel test robot noticed the following build errors:

Hi Rosen,

kernel test robot noticed the following build errors:

[auto build test ERROR on clk/clk-next]
[also build test ERROR on linus/master v7.2-rc7 next-20260807] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Rosen-Penev/clk-davinci-add-COMPILE_TEST-support/20260810-131535
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
patch link:    https://lore.kernel.org/r/20260719214214.726826-1-rosenp%40gmail.com
patch subject: [PATCHv2] clk: davinci: add COMPILE_TEST support
config: xtensa-randconfig-r051-20260811 (https://download.01.org/0day-ci/archive/20260811/[email protected]/config)
compiler: xtensa-linux-gcc (GCC) 12.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260811/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

.exit.text' referenced in section __jump_table' of fs/fuse/inode.o: defined in discarded section `.exit.text' of fs/fuse/inode.o
.exit.text' referenced in section __jump_table' of fs/fuse/inode.o: defined in discarded section `.exit.text' of fs/fuse/inode.o
.exit.text' referenced in section __jump_table' of drivers/target/target_core_configfs.o: defined in discarded section .exit.text' of drivers/target/target_core_configfs.o .exit.text' referenced in section __jump_table' of drivers/target/target_core_configfs.o: defined in discarded section .exit.text' of drivers/target/target_core_configfs.o .exit.text' referenced in section __jump_table' of drivers/rapidio/switches/idt_gen2.o: defined in discarded section .exit.text' of drivers/rapidio/switches/idt_gen2.o .exit.text' referenced in section __jump_table' of drivers/rapidio/switches/idt_gen2.o: defined in discarded section .exit.text' of drivers/rapidio/switches/idt_gen2.o .exit.text' referenced in section __jump_table' of drivers/rapidio/switches/idt_gen2.o: defined in discarded section .exit.text' of drivers/rapidio/switches/idt_gen2.o .exit.text' referenced in section __jump_table' of drivers/rapidio/switches/idt_gen2.o: defined in discarded section .exit.text' of drivers/rapidio/switches/idt_gen2.o

>> xtensa-linux-ld: drivers/clk/davinci/pll.o:(.init.literal+0x10): undefined reference to `of_da850_pll0_init'
>> xtensa-linux-ld: drivers/clk/davinci/pll.o:(.rodata+0x1178): undefined reference to `da850_pll0_init'
>> xtensa-linux-ld: drivers/clk/davinci/pll.o:(.rodata+0x1194): undefined reference to `da850_pll1_init'
>> xtensa-linux-ld: drivers/clk/davinci/pll.o:(.rodata+0x12a0): undefined reference to `of_da850_pll1_init'
   xtensa-linux-ld: drivers/clk/davinci/pll.o: in function `__da850_pll0_of_clk_init_declare':
   pll.c:(.init.text+0x1e): undefined reference to `of_da850_pll0_init'
>> xtensa-linux-ld: drivers/clk/davinci/psc.o:(.rodata+0x6b8): undefined reference to `da850_psc0_init_data'
>> xtensa-linux-ld: drivers/clk/davinci/psc.o:(.rodata+0x6d4): undefined reference to `da850_psc1_init_data'
>> xtensa-linux-ld: drivers/clk/davinci/psc.o:(.rodata+0x7e0): undefined reference to `of_da850_psc0_init_data'
>> xtensa-linux-ld: drivers/clk/davinci/psc.o:(.rodata+0x8a4): undefined reference to `of_da850_psc1_init_data'

.exit.text' referenced in section __jump_table' of drivers/misc/phantom.o: defined in discarded section .exit.text' of drivers/misc/phantom.o .exit.text' referenced in section __jump_table' of drivers/misc/phantom.o: defined in discarded section .exit.text' of drivers/misc/phantom.o

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki