Skip to contentSkip to conversation

pinctrl: tegra: Fix build dependency

PATCH In review Axel Lin 3 participants 4 messages Jun 4, 2016 – Jun 8, 2016

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 pinctrl: tegra: Fix build dependency

I got below build error:
ERROR: "tegra_xusb_padctl_legacy_probe" [drivers/phy/tegra/phy-tegra-xusb.ko] undefined! with below build configuration:
CONFIG_ARCH_TEGRA=y
CONFIG_PINCTRL_TEGRA_XUSB=y
CONFIG_PHY_TEGRA_XUSB=y

The problem is below line in drivers/pinctrl/Makefile
obj-$(CONFIG_PINCTRL_TEGRA) += tegra/

So even CONFIG_PINCTRL_TEGRA_XUSB=y is set, kbuild still does not compile the code in drivers/pinctrl/tegra folder if !CONFIG_PINCTRL_TEGRA.

phy-tegra-xusb.c does not use any symbol from pinctrl-tegra.c, so build pinctrl-tegra.c only when CONFIG_PINCTRL_TEGRA is set.

---
 drivers/pinctrl/Makefile       | 2 +-
 drivers/pinctrl/tegra/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/Makefile +1 -1
index 2ed0b3f..25ec450 100644
@@ -25,7 +25,7 @@ obj-$(CONFIG_PINCTRL_PISTACHIO)	+= pinctrl-pistachio.o
 obj-$(CONFIG_PINCTRL_ROCKCHIP)	+= pinctrl-rockchip.o
 obj-$(CONFIG_PINCTRL_SINGLE)	+= pinctrl-single.o
 obj-$(CONFIG_PINCTRL_SIRF)	+= sirf/
-obj-$(CONFIG_PINCTRL_TEGRA)	+= tegra/
+obj-$(CONFIG_ARCH_TEGRA)	+= tegra/
 obj-$(CONFIG_PINCTRL_TZ1090)	+= pinctrl-tz1090.o
 obj-$(CONFIG_PINCTRL_TZ1090_PDC)	+= pinctrl-tz1090-pdc.o
 obj-$(CONFIG_PINCTRL_U300)	+= pinctrl-u300.o
drivers/pinctrl/tegra/Makefile +1 -1
index a927379..d9ea2be 100644
@@ -1,4 +1,4 @@
-obj-y					+= pinctrl-tegra.o
+obj-$(CONFIG_PINCTRL_TEGRA)		+= pinctrl-tegra.o
 obj-$(CONFIG_PINCTRL_TEGRA20)		+= pinctrl-tegra20.o
 obj-$(CONFIG_PINCTRL_TEGRA30)		+= pinctrl-tegra30.o
 obj-$(CONFIG_PINCTRL_TEGRA114)		+= pinctrl-tegra114.o
Signature · 1 line
2.5.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Axel Lin

I got below build error:
ERROR: "tegra_xusb_padctl_legacy_probe" [drivers/phy/tegra/phy-tegra-xusb.ko] undefined! with below build configuration:
CONFIG_ARCH_TEGRA=y
CONFIG_PINCTRL_TEGRA_XUSB=y
CONFIG_PHY_TEGRA_XUSB=y

The above does not make sense because the error is from building a module but you say you have CONFIG_PINCTRL_TEGRA_XUSB=y. Shouldn't this be CONFIG_PINCTRL_TEGRA_XUSB=m? However, the error will occur either if you compile as a module or not, but the changelog should be accurate nonetheless.

Quoted 5 lines

The problem is below line in drivers/pinctrl/Makefile
obj-$(CONFIG_PINCTRL_TEGRA) += tegra/

So even CONFIG_PINCTRL_TEGRA_XUSB=y is set, kbuild still does not compile the code in drivers/pinctrl/tegra folder if !CONFIG_PINCTRL_TEGRA.

I was able to reproduce this by having CONFIG_PINCTRL_TEGRA_XUSB=y and !CONFIG_PINCTRL_TEGRA. So maybe that's all you need to say in the changelog with regard to the kernel config and get rid of the initial statement about kernel config.

Quoted 27 lines

phy-tegra-xusb.c does not use any symbol from pinctrl-tegra.c, so build pinctrl-tegra.c only when CONFIG_PINCTRL_TEGRA is set.

---
 drivers/pinctrl/Makefile       | 2 +-
 drivers/pinctrl/tegra/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/Makefile +1 -1
index 2ed0b3f..25ec450 100644
@@ -25,7 +25,7 @@ obj-$(CONFIG_PINCTRL_PISTACHIO)	+= pinctrl-pistachio.o
 obj-$(CONFIG_PINCTRL_ROCKCHIP)	+= pinctrl-rockchip.o
 obj-$(CONFIG_PINCTRL_SINGLE)	+= pinctrl-single.o
 obj-$(CONFIG_PINCTRL_SIRF)	+= sirf/
-obj-$(CONFIG_PINCTRL_TEGRA)	+= tegra/
+obj-$(CONFIG_ARCH_TEGRA)	+= tegra/
 obj-$(CONFIG_PINCTRL_TZ1090)	+= pinctrl-tz1090.o
 obj-$(CONFIG_PINCTRL_TZ1090_PDC)	+= pinctrl-tz1090-pdc.o
 obj-$(CONFIG_PINCTRL_U300)	+= pinctrl-u300.o
drivers/pinctrl/tegra/Makefile +0 -0
index a927379..d9ea2be 100644

drivers/pinctrl/tegra/Makefile line 4

Quoted 5 lines
drivers/pinctrl/tegra/Makefile +1 -1
@@ -1,4 +1,4 @@
-obj-y					+= pinctrl-tegra.o
+obj-$(CONFIG_PINCTRL_TEGRA)		+= pinctrl-tegra.o
 obj-$(CONFIG_PINCTRL_TEGRA20)		+= pinctrl-tegra20.o
 obj-$(CONFIG_PINCTRL_TEGRA30)		+= pinctrl-tegra30.o
 obj-$(CONFIG_PINCTRL_TEGRA114)		+= pinctrl-tegra114.o

This works for me. So, if you could fix up the changelog, you could add my ...

Cheers
Jon

Signature · 1 line
nvpublic
maintainer
#2 lore raw
Quoted 9 lines · Jon Hunter
Quoted 6 lines · Axel Lin

I got below build error:
ERROR: "tegra_xusb_padctl_legacy_probe" [drivers/phy/tegra/phy-tegra-xusb.ko] undefined! with below build configuration:
CONFIG_ARCH_TEGRA=y
CONFIG_PINCTRL_TEGRA_XUSB=y
CONFIG_PHY_TEGRA_XUSB=y

Quoted 5 lines

The above does not make sense because the error is from building a module but you say you have CONFIG_PINCTRL_TEGRA_XUSB=y. Shouldn't this be CONFIG_PINCTRL_TEGRA_XUSB=m? However, the error will occur either if you compile as a module or not, but the changelog should be accurate nonetheless.

Sorry I meant CONFIG_PHY_TEGRA_XUSB=m and NOT CONFIG_PINCTRL_TEGRA_XUSB=m as you are building the phy-tegra-xusb as a module.

Jon

--
nvpublic

#3 lore raw
In reply to Axel Lin
Quoted 10 lines · Axel Lin

I got below build error:
ERROR: "tegra_xusb_padctl_legacy_probe" [drivers/phy/tegra/phy-tegra-xusb.ko] undefined! with below build configuration:
CONFIG_ARCH_TEGRA=y
CONFIG_PINCTRL_TEGRA_XUSB=y
CONFIG_PHY_TEGRA_XUSB=y

The problem is below line in drivers/pinctrl/Makefile
obj-$(CONFIG_PINCTRL_TEGRA) += tegra/

Quoted 7 lines

So even CONFIG_PINCTRL_TEGRA_XUSB=y is set, kbuild still does not compile the code in drivers/pinctrl/tegra folder if !CONFIG_PINCTRL_TEGRA.

phy-tegra-xusb.c does not use any symbol from pinctrl-tegra.c, so build pinctrl-tegra.c only when CONFIG_PINCTRL_TEGRA is set.

Patch applied for fixes.

Yours,
Linus Walleij