mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-01 06:39:05 +00:00

The j721e driver has a single platform driver that can be built-in or a loadable module, but it calls two separate backend drivers depending on whether it is a host or endpoint. If the two modes are not the same, we can end up with a situation where the built-in pci-j721e driver tries to call the modular host or endpoint driver, which causes a link failure: ld.lld-21: error: undefined symbol: cdns_pcie_ep_setup >>> referenced by pci-j721e.c >>> drivers/pci/controller/cadence/pci-j721e.o:(j721e_pcie_probe) in archive vmlinux.a ld.lld-21: error: undefined symbol: cdns_pcie_host_setup >>> referenced by pci-j721e.c >>> drivers/pci/controller/cadence/pci-j721e.o:(j721e_pcie_probe) in archive vmlinux.a Rework the dependencies so that the 'select' is done by the common Kconfig symbol, based on which of the two are enabled. Effectively this means that having one built-in makes the other either built-in or disabled, but all configurations will now build. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com> Link: https://patch.msgid.link/20250423162523.2060405-1-arnd@kernel.org
71 lines
1.7 KiB
Plaintext
71 lines
1.7 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
menu "Cadence-based PCIe controllers"
|
|
depends on PCI
|
|
|
|
config PCIE_CADENCE
|
|
tristate
|
|
|
|
config PCIE_CADENCE_HOST
|
|
tristate
|
|
depends on OF
|
|
select IRQ_DOMAIN
|
|
select PCIE_CADENCE
|
|
|
|
config PCIE_CADENCE_EP
|
|
tristate
|
|
depends on OF
|
|
depends on PCI_ENDPOINT
|
|
select PCIE_CADENCE
|
|
|
|
config PCIE_CADENCE_PLAT
|
|
bool
|
|
|
|
config PCIE_CADENCE_PLAT_HOST
|
|
bool "Cadence platform PCIe controller (host mode)"
|
|
depends on OF
|
|
select PCIE_CADENCE_HOST
|
|
select PCIE_CADENCE_PLAT
|
|
help
|
|
Say Y here if you want to support the Cadence PCIe platform controller in
|
|
host mode. This PCIe controller may be embedded into many different
|
|
vendors SoCs.
|
|
|
|
config PCIE_CADENCE_PLAT_EP
|
|
bool "Cadence platform PCIe controller (endpoint mode)"
|
|
depends on OF
|
|
depends on PCI_ENDPOINT
|
|
select PCIE_CADENCE_EP
|
|
select PCIE_CADENCE_PLAT
|
|
help
|
|
Say Y here if you want to support the Cadence PCIe platform controller in
|
|
endpoint mode. This PCIe controller may be embedded into many
|
|
different vendors SoCs.
|
|
|
|
config PCI_J721E
|
|
tristate
|
|
select PCIE_CADENCE_HOST if PCI_J721E_HOST != n
|
|
select PCIE_CADENCE_EP if PCI_J721E_EP != n
|
|
|
|
config PCI_J721E_HOST
|
|
tristate "TI J721E PCIe controller (host mode)"
|
|
depends on ARCH_K3 || COMPILE_TEST
|
|
depends on OF
|
|
select PCI_J721E
|
|
help
|
|
Say Y here if you want to support the TI J721E PCIe platform
|
|
controller in host mode. TI J721E PCIe controller uses Cadence PCIe
|
|
core.
|
|
|
|
config PCI_J721E_EP
|
|
tristate "TI J721E PCIe controller (endpoint mode)"
|
|
depends on ARCH_K3 || COMPILE_TEST
|
|
depends on OF
|
|
depends on PCI_ENDPOINT
|
|
select PCI_J721E
|
|
help
|
|
Say Y here if you want to support the TI J721E PCIe platform
|
|
controller in endpoint mode. TI J721E PCIe controller uses Cadence PCIe
|
|
core.
|
|
endmenu
|