# SPDX-License-Identifier: GPL-2.0-only
config HW_HAS_PCI
	bool

if HW_HAS_PCI

menu "PCI bus options"

config PCI
	bool "Support for PCI controller"
	depends on HW_HAS_PCI
	help
	  Find out whether you have a PCI motherboard. PCI is the name of a
	  bus system, i.e. the way the CPU talks to the other stuff inside
	  your box. If you have PCI, say Y, otherwise N.


config PCI_DEBUG
	bool "PCI Debugging"
	depends on PCI
	help
	  Say Y here if you want the PCI core to produce a bunch of debug
	  messages to the system log.  Select this if you are having a
	  problem with PCI support and want to see more of what is going on.

	  When in doubt, say N.

config PCI_DYNAMIC_OF_NODES
	bool "Create devicetree nodes for runtime-enumerated PCI devices"
	depends on PCI && OFDEVICE
	help
	  Synthesize a devicetree node for every PCI device discovered during
	  bus scan that does not already have one in the static devicetree.
	  Nodes are attached to the live tree under the host-bridge / parent
	  bridge node, so they are visible to barebox itself and flow into the
	  devicetree passed to the kernel at boot.

	  This lets consumers (e.g. of_eth_register_ethaddr() for stamping a
	  MAC address) reference PCI endpoints by node path without
	  hand-writing the pci@D,F / dev@D,F hierarchy in the source DTS.

	  Only the bare minimum is generated: a node with a "reg" property
	  encoding the device/function so Linux's of_pci_find_child_device()
	  can attach the node to the device it rediscovers from hardware.
	  Linux recomputes everything else (compatible from VID/DID, bus-range
	  and ranges from config space, etc.) so adding it here would just be
	  duplicated state with no consumer.

	  When in doubt, say N.

config PCIE_DW
	bool

config PCI_MVEBU
	bool "Marvell EBU PCIe driver"
	depends on ARCH_MVEBU
	select OF_PCI
	select PCI

config PCI_TEGRA
	bool "NVDIA Tegra PCIe driver"
	depends on ARCH_TEGRA
	select OF_ADDRESS_PCI
	select OF_PCI
	select PCI

config PCI_IMX6
	bool "Freescale i.MX6/7/8 PCIe controller"
	depends on ARCH_IMX6 || ARCH_IMX7 || ARCH_IMX8MQ
	select PCIE_DW
	select OF_PCI
	select PCI

config PCI_LAYERSCAPE
	bool "Freescale Layerscape PCIe controller"
	depends on ARCH_LAYERSCAPE || COMPILE_TEST
	select PCIE_DW
	select OF_PCI
	select PCI

config PCI_ROCKCHIP
	bool "Rockchip PCIe controller"
	depends on ARCH_ROCKCHIP
	select PCIE_DW
	select OF_PCI
	select PCI

config PCI_EFI
	bool "EFI PCI protocol"
	depends on EFI_PAYLOAD
	select PCI

config PCI_ECAM_GENERIC
	tristate "Generic ECAM-based PCI host controller support"
	select OF_PCI
	select PCI
	help
	  Say Y here if you want to enable support for generic ECAM-based
	  PCI host controllers, such as the one emulated by QEMU.

endmenu

endif
