Skip to contentSkip to conversation

pinctrl: zynq: add CONFIG_OF dependency

PATCH In review Arnd Bergmann 4 participants 5 messages Jun 20, 2025 – Jun 24, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: zynq: add CONFIG_OF dependency

From: Arnd Bergmann <[email protected]>

The zynq driver can be enabled for compile-testing on builds without CONFIG_OF, leading to a link error:

ld.lld-21: error: undefined symbol: pinconf_generic_dt_node_to_map
referenced by pinconf-generic.h:231 (/home/arnd/arm-soc/include/linux/pinctrl/pinconf-generic.h:231)
drivers/pinctrl/pinctrl-zynq.o:(pinconf_generic_dt_node_to_map_all) in archive vmlinux.a

Prevent this with the proper compile time dependency.

Fixes 1982621decaf ("pinctrl: Allow compile testing for K210, TB10X and ZYNQ")
---
 drivers/pinctrl/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/pinctrl/Kconfig +1 -0
index 753692e9ecf5..ddd11668457c 100644
@@ -603,6 +603,7 @@ config PINCTRL_TH1520
 config PINCTRL_ZYNQ
 	bool "Pinctrl driver for Xilinx Zynq"
 	depends on ARCH_ZYNQ || COMPILE_TEST
+	depends on OF
 	select PINMUX
 	select GENERIC_PINCONF
 	help
Signature · 1 line
2.39.5
#1 lore raw
Quoted 31 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The zynq driver can be enabled for compile-testing on builds without CONFIG_OF, leading to a link error:

ld.lld-21: error: undefined symbol: pinconf_generic_dt_node_to_map
referenced by pinconf-generic.h:231 (/home/arnd/arm-soc/include/linux/pinctrl/pinconf-generic.h:231)
drivers/pinctrl/pinctrl-zynq.o:(pinconf_generic_dt_node_to_map_all) in archive vmlinux.a

Prevent this with the proper compile time dependency.

Fixes 1982621decaf ("pinctrl: Allow compile testing for K210, TB10X and ZYNQ")
---
 drivers/pinctrl/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/pinctrl/Kconfig +1 -1
index 753692e9ecf5..ddd11668457c 100644
@@ -603,6 +603,7 @@ config PINCTRL_TH1520
 config PINCTRL_ZYNQ
        bool "Pinctrl driver for Xilinx Zynq"
        depends on ARCH_ZYNQ || COMPILE_TEST
+       depends on OF
        select PINMUX
        select GENERIC_PINCONF
        help
--
Quoted 3 lines

2.39.5

I don't think this is the actual problem. I can build (and link) pinctrl-zynq with COMPILE_OF disabled alright. Can you paste the entire offending .config somewhere?

Bartosz

#2 lore raw
Quoted 15 lines · Bartosz Golaszewski

drivers/pinctrl/Kconfig config PINCTRL_TH1520 · line 607

Quoted 8 lines · Arnd Bergmann
drivers/pinctrl/Kconfig +1 -0
@@ -603,6 +603,7 @@ config PINCTRL_TH1520
 config PINCTRL_ZYNQ
        bool "Pinctrl driver for Xilinx Zynq"
        depends on ARCH_ZYNQ || COMPILE_TEST
+       depends on OF
        select PINMUX

I don't think this is the actual problem. I can build (and link) pinctrl-zynq with COMPILE_OF disabled alright. Can you paste the entire offending .config somewhere?

This is from a randconfig build: https://pastebin.com/ism57RPe

Arnd

#3 lore raw
Quoted 18 lines · Arnd Bergmann
Quoted 15 lines · Bartosz Golaszewski

drivers/pinctrl/Kconfig config PINCTRL_TH1520 · line 607

Quoted 8 lines · Arnd Bergmann
drivers/pinctrl/Kconfig +1 -0
@@ -603,6 +603,7 @@ config PINCTRL_TH1520
 config PINCTRL_ZYNQ
        bool "Pinctrl driver for Xilinx Zynq"
        depends on ARCH_ZYNQ || COMPILE_TEST
+       depends on OF
        select PINMUX

I don't think this is the actual problem. I can build (and link) pinctrl-zynq with COMPILE_OF disabled alright. Can you paste the entire offending .config somewhere?

Quoted 3 lines

This is from a randconfig build: https://pastebin.com/ism57RPe

Arnd

Right. I don't have the time to look into untangling it but in general all OF interfaces have relevant stubs so depends on OF should not be needed. But it's more complex here in pinctrl so I'm fine with this for now.

Bartosz

#4 lore raw
In reply to Arnd Bergmann
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The zynq driver can be enabled for compile-testing on builds without CONFIG_OF, leading to a link error:

Quoted 8 lines

ld.lld-21: error: undefined symbol: pinconf_generic_dt_node_to_map
referenced by pinconf-generic.h:231 (/home/arnd/arm-soc/include/linux/pinctrl/pinconf-generic.h:231)
drivers/pinctrl/pinctrl-zynq.o:(pinconf_generic_dt_node_to_map_all) in archive vmlinux.a

Prevent this with the proper compile time dependency.

Fixes 1982621decaf ("pinctrl: Allow compile testing for K210, TB10X and ZYNQ")

Patch applied!

Yours,
Linus Walleij