mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
23a5fba4d9
Some PCI host controllers do not expose a configuration space for the root port PCI bridge. Due to this, the Marvell Armada 370/38x/XP PCI controller driver (pci-mvebu) emulates a root port PCI bridge configuration space, and uses that to (among other things) dynamically create the memory windows that correspond to the PCI MEM and I/O regions. Since we now need to add a very similar logic for the Marvell Armada 37xx PCI controller driver (pci-aardvark), instead of duplicating the code, we create in this commit a common logic called pci-bridge-emul. The idea of this logic is to emulate a root port PCI bridge configuration space by providing configuration space read/write operations, and faking behind the scenes the configuration space of a PCI bridge. A PCI host controller driver simply has to call pci_bridge_emul_conf_read() and pci_bridge_emul_conf_write() to read/write the configuration space of the bridge. By default, the PCI bridge configuration space is simply emulated by a chunk of memory, but the PCI host controller can override the behavior of the read and write operations on a per-register basis to do additional actions if needed. We take care of complying with the behavior of the PCI configuration space registers in terms of bits that are read-write, read-only, reserved and write-1-to-clear. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Russell King <rmk+kernel@armlinux.org.uk>
39 lines
1.1 KiB
Makefile
39 lines
1.1 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for the PCI bus specific drivers.
|
|
|
|
obj-$(CONFIG_PCI) += access.o bus.o probe.o host-bridge.o \
|
|
remove.o pci.o pci-driver.o search.o \
|
|
pci-sysfs.o rom.o setup-res.o irq.o vpd.o \
|
|
setup-bus.o vc.o mmap.o setup-irq.o
|
|
|
|
ifdef CONFIG_PCI
|
|
obj-$(CONFIG_PROC_FS) += proc.o
|
|
obj-$(CONFIG_SYSFS) += slot.o
|
|
obj-$(CONFIG_OF) += of.o
|
|
endif
|
|
|
|
obj-$(CONFIG_PCI_QUIRKS) += quirks.o
|
|
obj-$(CONFIG_PCIEPORTBUS) += pcie/
|
|
obj-$(CONFIG_HOTPLUG_PCI) += hotplug/
|
|
obj-$(CONFIG_PCI_MSI) += msi.o
|
|
obj-$(CONFIG_PCI_ATS) += ats.o
|
|
obj-$(CONFIG_PCI_IOV) += iov.o
|
|
obj-$(CONFIG_PCI_BRIDGE_EMUL) += pci-bridge-emul.o
|
|
obj-$(CONFIG_ACPI) += pci-acpi.o
|
|
obj-$(CONFIG_PCI_LABEL) += pci-label.o
|
|
obj-$(CONFIG_X86_INTEL_MID) += pci-mid.o
|
|
obj-$(CONFIG_PCI_SYSCALL) += syscall.o
|
|
obj-$(CONFIG_PCI_STUB) += pci-stub.o
|
|
obj-$(CONFIG_PCI_PF_STUB) += pci-pf-stub.o
|
|
obj-$(CONFIG_PCI_ECAM) += ecam.o
|
|
obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += xen-pcifront.o
|
|
|
|
# Endpoint library must be initialized before its users
|
|
obj-$(CONFIG_PCI_ENDPOINT) += endpoint/
|
|
|
|
obj-y += controller/
|
|
obj-y += switch/
|
|
|
|
ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG
|