summaryrefslogtreecommitdiffstats
path: root/drivers/pci/Kconfig
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-10-18 17:37:16 +0200
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2018-10-18 18:50:19 +0200
commit23a5fba4d9411787c8e86ff5808e7d8e41bf3935 (patch)
tree2569b40cb46199c00331338936d203dffbfbfbae /drivers/pci/Kconfig
parentdt-bindings: PCI: rcar: Add device tree support for r8a7744 (diff)
downloadlinux-23a5fba4d9411787c8e86ff5808e7d8e41bf3935.tar.xz
linux-23a5fba4d9411787c8e86ff5808e7d8e41bf3935.zip
PCI: Introduce PCI bridge emulated config space common logic
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>
Diffstat (limited to 'drivers/pci/Kconfig')
-rw-r--r--drivers/pci/Kconfig3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 56ff8f6d31fc..4a28e07d4c0e 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -98,6 +98,9 @@ config PCI_ECAM
config PCI_LOCKLESS_CONFIG
bool
+config PCI_BRIDGE_EMUL
+ bool
+
config PCI_IOV
bool "PCI IOV support"
depends on PCI