diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2018-01-31 11:21:33 -0500 |
|---|---|---|
| committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-01-31 11:21:33 -0500 |
| commit | c7f75aecb2d9436c4bef8b413231f60deae3453c (patch) | |
| tree | ad6082d4a0d79226637af66ee8f2fc4b24590d4b | |
| parent | a07ae842e209196ffe0fe8feacd489aba772d8a0 (diff) | |
| parent | 37dddf14f1aecd9fa89a5136b38b33cab54b9195 (diff) | |
Merge remote-tracking branch 'lorenzo/pci/cadence' into next
* lorenzo/pci/cadence:
PCI: cadence: Add EndPoint Controller driver for Cadence PCIe controller
dt-bindings: PCI: cadence: Add DT bindings for Cadence PCIe endpoint controller
PCI: endpoint: Fix EPF device name to support multi-function devices
PCI: endpoint: Add the function number as argument to EPC ops
PCI: cadence: Add host driver for Cadence PCIe controller
dt-bindings: PCI: cadence: Add DT bindings for Cadence PCIe host controller
PCI: Add vendor ID for Cadence
PCI: Add generic function to probe PCI host controllers
PCI: generic: fix missing call of pci_free_resource_list()
PCI: OF: Add generic function to parse and allocate PCI resources
PCI: Regroup all PCI related entries into drivers/pci/Makefile
Conflicts:
drivers/pci/of.c
include/linux/pci.h
24 files changed, 1695 insertions, 149 deletions
diff --git a/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-ep.txt b/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-ep.txt new file mode 100644 index 000000000000..9a305237fa6e --- /dev/null +++ b/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-ep.txt | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | * Cadence PCIe endpoint controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should contain "cdns,cdns-pcie-ep" to identify the IP used. | ||
| 5 | - reg: Should contain the controller register base address and AXI interface | ||
| 6 | region base address respectively. | ||
| 7 | - reg-names: Must be "reg" and "mem" respectively. | ||
| 8 | - cdns,max-outbound-regions: Set to maximum number of outbound regions | ||
| 9 | |||
| 10 | Optional properties: | ||
| 11 | - max-functions: Maximum number of functions that can be configured (default 1). | ||
| 12 | |||
| 13 | Example: | ||
| 14 | |||
| 15 | pcie@fc000000 { | ||
| 16 | compatible = "cdns,cdns-pcie-ep"; | ||
| 17 | reg = <0x0 0xfc000000 0x0 0x01000000>, | ||
| 18 | <0x0 0x80000000 0x0 0x40000000>; | ||
| 19 | reg-names = "reg", "mem"; | ||
| 20 | cdns,max-outbound-regions = <16>; | ||
| 21 | max-functions = /bits/ 8 <8>; | ||
| 22 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-host.txt b/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-host.txt new file mode 100644 index 000000000000..20a33f38f69d --- /dev/null +++ b/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-host.txt | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | * Cadence PCIe host controller | ||
| 2 | |||
| 3 | This PCIe controller inherits the base properties defined in | ||
| 4 | host-generic-pci.txt. | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible: Should contain "cdns,cdns-pcie-host" to identify the IP used. | ||
| 8 | - reg: Should contain the controller register base address, PCIe configuration | ||
| 9 | window base address, and AXI interface region base address respectively. | ||
| 10 | - reg-names: Must be "reg", "cfg" and "mem" respectively. | ||
| 11 | - #address-cells: Set to <3> | ||
| 12 | - #size-cells: Set to <2> | ||
| 13 | - device_type: Set to "pci" | ||
| 14 | - ranges: Ranges for the PCI memory and I/O regions | ||
| 15 | - #interrupt-cells: Set to <1> | ||
| 16 | - interrupt-map-mask and interrupt-map: Standard PCI properties to define the | ||
| 17 | mapping of the PCIe interface to interrupt numbers. | ||
| 18 | |||
| 19 | Optional properties: | ||
| 20 | - cdns,max-outbound-regions: Set to maximum number of outbound regions | ||
| 21 | (default 32) | ||
| 22 | - cdns,no-bar-match-nbits: Set into the no BAR match register to configure the | ||
| 23 | number of least significant bits kept during inbound (PCIe -> AXI) address | ||
| 24 | translations (default 32) | ||
| 25 | - vendor-id: The PCI vendor ID (16 bits, default is design dependent) | ||
| 26 | - device-id: The PCI device ID (16 bits, default is design dependent) | ||
| 27 | |||
| 28 | Example: | ||
| 29 | |||
| 30 | pcie@fb000000 { | ||
| 31 | compatible = "cdns,cdns-pcie-host"; | ||
| 32 | device_type = "pci"; | ||
| 33 | #address-cells = <3>; | ||
| 34 | #size-cells = <2>; | ||
| 35 | bus-range = <0x0 0xff>; | ||
| 36 | linux,pci-domain = <0>; | ||
| 37 | cdns,max-outbound-regions = <16>; | ||
| 38 | cdns,no-bar-match-nbits = <32>; | ||
| 39 | vendor-id = /bits/ 16 <0x17cd>; | ||
| 40 | device-id = /bits/ 16 <0x0200>; | ||
| 41 | |||
| 42 | reg = <0x0 0xfb000000 0x0 0x01000000>, | ||
| 43 | <0x0 0x41000000 0x0 0x00001000>, | ||
| 44 | <0x0 0x40000000 0x0 0x04000000>; | ||
| 45 | reg-names = "reg", "cfg", "mem"; | ||
| 46 | |||
| 47 | ranges = <0x02000000 0x0 0x42000000 0x0 0x42000000 0x0 0x1000000>, | ||
| 48 | <0x01000000 0x0 0x43000000 0x0 0x43000000 0x0 0x0010000>; | ||
| 49 | |||
| 50 | #interrupt-cells = <0x1>; | ||
| 51 | |||
| 52 | interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0x0 0x0 14 0x1 | ||
| 53 | 0x0 0x0 0x0 0x2 &gic 0x0 0x0 0x0 15 0x1 | ||
| 54 | 0x0 0x0 0x0 0x3 &gic 0x0 0x0 0x0 16 0x1 | ||
| 55 | 0x0 0x0 0x0 0x4 &gic 0x0 0x0 0x0 17 0x1>; | ||
| 56 | |||
| 57 | interrupt-map-mask = <0x0 0x0 0x0 0x7>; | ||
| 58 | |||
| 59 | msi-parent = <&its_pci>; | ||
| 60 | }; | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 13945646b95d..cc24c74a946e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -10402,6 +10402,13 @@ S: Maintained | |||
| 10402 | F: Documentation/devicetree/bindings/pci/pci-armada8k.txt | 10402 | F: Documentation/devicetree/bindings/pci/pci-armada8k.txt |
| 10403 | F: drivers/pci/dwc/pcie-armada8k.c | 10403 | F: drivers/pci/dwc/pcie-armada8k.c |
| 10404 | 10404 | ||
| 10405 | PCI DRIVER FOR CADENCE PCIE IP | ||
| 10406 | M: Alan Douglas <adouglas@cadence.com> | ||
| 10407 | L: linux-pci@vger.kernel.org | ||
| 10408 | S: Maintained | ||
| 10409 | F: Documentation/devicetree/bindings/pci/cdns,*.txt | ||
| 10410 | F: drivers/pci/cadence/pcie-cadence* | ||
| 10411 | |||
| 10405 | PCI DRIVER FOR FREESCALE LAYERSCAPE | 10412 | PCI DRIVER FOR FREESCALE LAYERSCAPE |
| 10406 | M: Minghuan Lian <minghuan.Lian@freescale.com> | 10413 | M: Minghuan Lian <minghuan.Lian@freescale.com> |
| 10407 | M: Mingkai Hu <mingkai.hu@freescale.com> | 10414 | M: Mingkai Hu <mingkai.hu@freescale.com> |
diff --git a/drivers/Makefile b/drivers/Makefile index e06f7f633f73..8189b1edec00 100644 --- a/drivers/Makefile +++ b/drivers/Makefile | |||
| @@ -16,10 +16,7 @@ obj-$(CONFIG_PINCTRL) += pinctrl/ | |||
| 16 | obj-$(CONFIG_GPIOLIB) += gpio/ | 16 | obj-$(CONFIG_GPIOLIB) += gpio/ |
| 17 | obj-y += pwm/ | 17 | obj-y += pwm/ |
| 18 | 18 | ||
| 19 | obj-$(CONFIG_PCI) += pci/ | 19 | obj-y += pci/ |
| 20 | obj-$(CONFIG_PCI_ENDPOINT) += pci/endpoint/ | ||
| 21 | # PCI dwc controller drivers | ||
| 22 | obj-y += pci/dwc/ | ||
| 23 | 20 | ||
| 24 | obj-$(CONFIG_PARISC) += parisc/ | 21 | obj-$(CONFIG_PARISC) += parisc/ |
| 25 | obj-$(CONFIG_RAPIDIO) += rapidio/ | 22 | obj-$(CONFIG_RAPIDIO) += rapidio/ |
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index bda151788f3f..dee90cc1dcaf 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig | |||
| @@ -125,6 +125,7 @@ config PCI_PASID | |||
| 125 | 125 | ||
| 126 | config PCI_LABEL | 126 | config PCI_LABEL |
| 127 | def_bool y if (DMI || ACPI) | 127 | def_bool y if (DMI || ACPI) |
| 128 | depends on PCI | ||
| 128 | select NLS | 129 | select NLS |
| 129 | 130 | ||
| 130 | config PCI_HYPERV | 131 | config PCI_HYPERV |
| @@ -135,6 +136,7 @@ config PCI_HYPERV | |||
| 135 | PCI devices from a PCI backend to support PCI driver domains. | 136 | PCI devices from a PCI backend to support PCI driver domains. |
| 136 | 137 | ||
| 137 | source "drivers/pci/hotplug/Kconfig" | 138 | source "drivers/pci/hotplug/Kconfig" |
| 139 | source "drivers/pci/cadence/Kconfig" | ||
| 138 | source "drivers/pci/dwc/Kconfig" | 140 | source "drivers/pci/dwc/Kconfig" |
| 139 | source "drivers/pci/host/Kconfig" | 141 | source "drivers/pci/host/Kconfig" |
| 140 | source "drivers/pci/endpoint/Kconfig" | 142 | source "drivers/pci/endpoint/Kconfig" |
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index c7819b973df7..941970936840 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile | |||
| @@ -3,12 +3,15 @@ | |||
| 3 | # Makefile for the PCI bus specific drivers. | 3 | # Makefile for the PCI bus specific drivers. |
| 4 | # | 4 | # |
| 5 | 5 | ||
| 6 | obj-y += access.o bus.o probe.o host-bridge.o remove.o pci.o \ | 6 | obj-$(CONFIG_PCI) += access.o bus.o probe.o host-bridge.o remove.o pci.o \ |
| 7 | pci-driver.o search.o pci-sysfs.o rom.o setup-res.o \ | 7 | pci-driver.o search.o pci-sysfs.o rom.o setup-res.o \ |
| 8 | irq.o vpd.o setup-bus.o vc.o mmap.o setup-irq.o | 8 | irq.o vpd.o setup-bus.o vc.o mmap.o setup-irq.o |
| 9 | 9 | ||
| 10 | ifdef CONFIG_PCI | ||
| 10 | obj-$(CONFIG_PROC_FS) += proc.o | 11 | obj-$(CONFIG_PROC_FS) += proc.o |
| 11 | obj-$(CONFIG_SYSFS) += slot.o | 12 | obj-$(CONFIG_SYSFS) += slot.o |
| 13 | obj-$(CONFIG_OF) += of.o | ||
| < | |||
