Skip to contentSkip to conversation

PCI: imx6: fix building against pwrctrl

PATCH Applied Arnd Bergmann 3 participants 3 messages Jun 18 – Jul 1

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

PATCH 1/1 PCI: imx6: fix building against pwrctrl

From: Arnd Bergmann <[email protected]>

When endpoint mode is built-in, but pwrctrl support is in a loadable module, the imx driver fails to build because the unused host support still tries to link against pwrctrl:

ld.lld: error: undefined symbol: pci_pwrctrl_power_off_devices

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

referenced by pci-imx6.c:1988 (drivers/pci/controller/dwc/pci-imx6.c:1988)
drivers/pci/controller/dwc/pci-imx6.o:(imx_pcie_shutdown) in archive vmlinux.a

Add one more select for this.

----
There is already another fix pending that I sent earlier, see
https://lore.kernel.org/all/ajF_LyjOnINAHvA3@lizhi-Precision-Tower-5810/

If you prefer a combined patch, I can send an updated version, or you can just fold the two into one commit when applying.

---
 drivers/pci/controller/dwc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/controller/dwc/Kconfig +1 -0
index 7d49027c6736..49a7a2c50ca1 100644
@@ -128,6 +128,7 @@ config PCI_IMX6_EP
 	select PCIE_DW_EP
 	select PCI_HOST_COMMON
 	select PCI_IMX6
+	select PCI_PWRCTRL_GENERIC
 	help
 	  Enables support for the PCIe controller in the i.MX SoCs to
 	  work in endpoint mode. The PCI controller on i.MX is based
Signature · 1 line
2.39.5
#1 lore raw
Quoted 8 lines

Subject: [PATCH] PCI: imx6: fix building against pwrctrl

From: Arnd Bergmann <[email protected]>

When endpoint mode is built-in, but pwrctrl support is in a loadable module, the imx driver fails to build because the unused host support still tries to link against pwrctrl:

Quoted 9 lines

ld.lld: error: undefined symbol: pci_pwrctrl_power_off_devices

Quoted 1 line
Quoted 1 line
Quoted 1 line

referenced by pci-imx6.c:1988 (drivers/pci/controller/dwc/pci-

imx6.c:1988)

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/pci/controller/dwc/pci-imx6.o:(imx_pcie_shutdown) in archive vmlinux.a

Add one more select for this.

Please add fixes tag:

Fixes 85c1fcfa740d ("PCI: imx6: Integrate new pwrctrl API")

Then, Reviewed-by: Sherry Sun <[email protected]>

Best Regards
Sherry

Quoted 34 lines

----
There is already another fix pending that I sent earlier, see
https://lore.ke/
rnel.org%2Fall%2FajF_LyjOnINAHvA3%40lizhi-Precision-Tower- 5810%2F&data=05%7C02%7Csherry.sun%40nxp.com%7C3e0137032b804a37 de3908decd471c75%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6 39173902484468360%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOn RydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ %3D%3D%7C0%7C%7C%7C&sdata=EoEuSedEedto7cGxbHL%2Fid4wcs6%2FTi BKI1sewlNdt%2FU%3D&reserved=0

If you prefer a combined patch, I can send an updated version, or you can just fold the two into one commit when applying.

---
 drivers/pci/controller/dwc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/controller/dwc/Kconfig +1 -1
index 7d49027c6736..49a7a2c50ca1 100644
@@ -128,6 +128,7 @@ config PCI_IMX6_EP
      select PCIE_DW_EP
      select PCI_HOST_COMMON
      select PCI_IMX6
+     select PCI_PWRCTRL_GENERIC
      help
        Enables support for the PCIe controller in the i.MX SoCs to
        work in endpoint mode. The PCI controller on i.MX is based
--

2.39.5

#2 lore raw
In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

When endpoint mode is built-in, but pwrctrl support is in a loadable module, the imx driver fails to build because the unused host support still tries to link against pwrctrl:

ld.lld: error: undefined symbol: pci_pwrctrl_power_off_devices

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

referenced by pci-imx6.c:1988 (drivers/pci/controller/dwc/pci-imx6.c:1988)
drivers/pci/controller/dwc/pci-imx6.o:(imx_pcie_shutdown) in archive vmlinux.a

[...]

Applied, thanks!

[1/1] PCI: imx6: fix building against pwrctrl

      commit: 7f4d9901eb1fdd3d2e56b514dcc325b33185b8e1

Best regards,

Signature · 1 line
மணிவண்ணன் சதாசிவம்