Re: [PATCH] PCI: imx6: fix building against host-common
From: Frank Li
Date: Tue Jun 16 2026 - 13:08:58 EST
On Tue, Jun 16, 2026 at 06:39:59PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> 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: 250eea5c06f5 ("PCI: imx6: Parse 'reset-gpios' in Root Port nodes")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
> drivers/pci/controller/dwc/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> index aa0b784c85b4..7d49027c6736 100644
> --- a/drivers/pci/controller/dwc/Kconfig
> +++ b/drivers/pci/controller/dwc/Kconfig
> @@ -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
> --
> 2.39.5
>