aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2018-01-31 11:21:33 -0500
committerBjorn Helgaas <helgaas@kernel.org>2018-01-31 11:21:33 -0500
commitc7f75aecb2d9436c4bef8b413231f60deae3453c (patch)
treead6082d4a0d79226637af66ee8f2fc4b24590d4b
parenta07ae842e209196ffe0fe8feacd489aba772d8a0 (diff)
parent37dddf14f1aecd9fa89a5136b38b33cab54b9195 (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
-rw-r--r--Documentation/devicetree/bindings/pci/cdns,cdns-pcie-ep.txt22
-rw-r--r--Documentation/devicetree/bindings/pci/cdns,cdns-pcie-host.txt60
-rw-r--r--MAINTAINERS7
-rw-r--r--drivers/Makefile5
-rw-r--r--drivers/pci/Kconfig2
-rw-r--r--drivers/pci/Makefile14
-rw-r--r--drivers/pci/cadence/Kconfig27
-rw-r--r--drivers/pci/cadence/Makefile4
-rw-r--r--drivers/pci/cadence/pcie-cadence-ep.c542
-rw-r--r--drivers/pci/cadence/pcie-cadence-host.c336
-rw-r--r--drivers/pci/cadence/pcie-cadence.c126
-rw-r--r--drivers/pci/cadence/pcie-cadence.h311
-rw-r--r--drivers/pci/dwc/Makefile2
-rw-r--r--drivers/pci/dwc/pcie-designware-ep.c20
-rw-r--r--drivers/pci/endpoint/functions/pci-epf-test.c41
-rw-r--r--drivers/pci/endpoint/pci-ep-cfs.c46
-rw-r--r--drivers/pci/endpoint/pci-epc-core.c62
-rw-r--r--drivers/pci/host/Makefile2
-rw-r--r--drivers/pci/host/pci-host-common.c72
-rw-r--r--drivers/pci/of.c53
-rw-r--r--drivers/pci/probe.c33
-rw-r--r--include/linux/pci-epc.h43
-rw-r--r--include/linux/pci.h12
-rw-r--r--include/linux/pci_ids.h2
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
3Required 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
10Optional properties:
11- max-functions: Maximum number of functions that can be configured (default 1).
12
13Example:
14
15pcie@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
3This PCIe controller inherits the base properties defined in
4host-generic-pci.txt.
5
6Required 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
19Optional 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
28Example:
29
30pcie@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
10402F: Documentation/devicetree/bindings/pci/pci-armada8k.txt 10402F: Documentation/devicetree/bindings/pci/pci-armada8k.txt
10403F: drivers/pci/dwc/pcie-armada8k.c 10403F: drivers/pci/dwc/pcie-armada8k.c
10404 10404
10405PCI DRIVER FOR CADENCE PCIE IP
10406M: Alan Douglas <adouglas@cadence.com>
10407L: linux-pci@vger.kernel.org
10408S: Maintained
10409F: Documentation/devicetree/bindings/pci/cdns,*.txt
10410F: drivers/pci/cadence/pcie-cadence*
10411
10405PCI DRIVER FOR FREESCALE LAYERSCAPE 10412PCI DRIVER FOR FREESCALE LAYERSCAPE
10406M: Minghuan Lian <minghuan.Lian@freescale.com> 10413M: Minghuan Lian <minghuan.Lian@freescale.com>
10407M: Mingkai Hu <mingkai.hu@freescale.com> 10414M: 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/
16obj-$(CONFIG_GPIOLIB) += gpio/ 16obj-$(CONFIG_GPIOLIB) += gpio/
17obj-y += pwm/ 17obj-y += pwm/
18 18
19obj-$(CONFIG_PCI) += pci/ 19obj-y += pci/
20obj-$(CONFIG_PCI_ENDPOINT) += pci/endpoint/
21# PCI dwc controller drivers
22obj-y += pci/dwc/
23 20
24obj-$(CONFIG_PARISC) += parisc/ 21obj-$(CONFIG_PARISC) += parisc/
25obj-$(CONFIG_RAPIDIO) += rapidio/ 22obj-$(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
126config PCI_LABEL 126config 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
130config PCI_HYPERV 131config 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
137source "drivers/pci/hotplug/Kconfig" 138source "drivers/pci/hotplug/Kconfig"
139source "drivers/pci/cadence/Kconfig"
138source "drivers/pci/dwc/Kconfig" 140source "drivers/pci/dwc/Kconfig"
139source "drivers/pci/host/Kconfig" 141source "drivers/pci/host/Kconfig"
140source "drivers/pci/endpoint/Kconfig" 142source "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
6obj-y += access.o bus.o probe.o host-bridge.o remove.o pci.o \ 6obj-$(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
10ifdef CONFIG_PCI
10obj-$(CONFIG_PROC_FS) += proc.o 11obj-$(CONFIG_PROC_FS) += proc.o
11obj-$(CONFIG_SYSFS) += slot.o 12obj-$(CONFIG_SYSFS) += slot.o
13obj-$(CONFIG_OF) += of.o
<