PCI: imx6: Fix building against PCI_HOST_COMMON

When CONFIG_PCI_HOST_COMMON is set to =m, the i.MX6 PCIe driver
fails to link. This can happen when only i.MX endpoint mode is
enabled but not host mode, which would indirectly enable the
host-common driver itself.

  ld.lld: error: undefined symbol: pci_host_common_parse_ports
  >>> referenced by pci-imx6.c
  >>>               drivers/pci/controller/dwc/pci-imx6.o:(imx_pcie_host_init) in archive vmlinux.a

  ld.lld: error: undefined symbol: pci_host_common_delete_ports
  >>> referenced by pci-imx6.c
  >>>               drivers/pci/controller/dwc/pci-imx6.o:(imx_pcie_host_init) in archive vmlinux.a
  >>> referenced by pci-imx6.c
  >>>               drivers/pci/controller/dwc/pci-imx6.o:(imx_pcie_host_init) in archive vmlinux.a

Select the common module from the endpoint support directly.

Fixes: 250eea5c06 ("PCI: imx6: Parse 'reset-gpios' in Root Port nodes")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260616164049.3656435-1-arnd@kernel.org
This commit is contained in:
Arnd Bergmann 2026-06-16 18:39:59 +02:00 committed by Manivannan Sadhasivam
parent 3567bcf0e9
commit d4e0984f12

View File

@ -126,6 +126,7 @@ config PCI_IMX6_EP
depends on ARCH_MXC || COMPILE_TEST
depends on PCI_ENDPOINT
select PCIE_DW_EP
select PCI_HOST_COMMON
select PCI_IMX6
help
Enables support for the PCIe controller in the i.MX SoCs to