Skip to content

Commit 69a06e4

Browse files
committed
Merge branches 'pci/host-aardvark', 'pci/host-altera', 'pci/host-artpec', 'pci/host-designware', 'pci/host-hv', 'pci/host-keystone', 'pci/host-rcar', 'pci/host-rockchip', 'pci/host-tegra' and 'pci/host-xilinx' into next
* pci/host-aardvark: PCI: aardvark: Remove redundant dev_err call in advk_pcie_probe() * pci/host-altera: PCI: altera: Remove redundant platform_get_resource() return value check PCI: altera: Move retrain from fixup to altera_pcie_host_init() PCI: altera: Rework config accessors for use without a struct pci_bus PCI: altera: Poll for link training status after retraining the link * pci/host-artpec: PCI: artpec6: Drop __init from artpec6_add_pcie_port() * pci/host-designware: PCI: designware: Remove redundant platform_get_resource() return value check PCI: designware: Exchange viewport of `MEMORYs' and `CFGs/IOs' PCI: designware: Keep viewport fixed for IO transaction if num_viewport > 2 PCI: designware: Check LTSSM training bit before deciding link is up PCI: designware: Add iATU Unroll feature PCI: designware: Wait for iATU enable PCI: designware: Move link wait definitions to .c file PCI: designware: Return data directly from dw_pcie_readl_rc() * pci/host-hv: PCI: hv: Handle hv_pci_generic_compl() error case PCI: hv: Handle vmbus_sendpacket() failure in hv_compose_msi_msg() PCI: hv: Remove the unused 'wrk' in struct hv_pcibus_device PCI: hv: Use pci_function_description[0] in struct definitions PCI: hv: Use zero-length array in struct pci_packet PCI: hv: Use list_move_tail() instead of list_del() + list_add_tail() * pci/host-keystone: PCI: keystone: Propagate request_irq() failure * pci/host-rcar: PCI: rcar: Try increasing PCIe link speed to 5 GT/s at boot PCI: rcar: Fix some checkpatch warnings PCI: rcar: Add multi-MSI support PCI: rcar: Don't disable/unprepare clocks on prepare/enable failure PCI: rcar: Consolidate register space lookup and ioremap * pci/host-rockchip: PCI: rockchip: Fix wrong transmitted FTS count PCI: rockchip: Improve the deassert sequence of four reset pins PCI: rockchip: Increase the Max Credit update interval PCI: rockchip: Add Rockchip PCIe controller support dt-bindings: PCI: rockchip: Add DT bindings for Rockchip PCIe controller * pci/host-tegra: PCI: tegra: Use of_device_get_match_data() PCI: tegra: Remove redundant _data suffix * pci/host-xilinx: microblaze/PCI: Add multidomain support for procfs PCI: xilinx: Dispose of MSI virtual IRQ PCI: xilinx: Clear correct MSI set bit PCI: xilinx: Clear interrupt register for invalid interrupt PCI: xilinx: Keep both legacy and MSI interrupt domain references PCI: xilinx-nwl: Enable all MSI interrupts using MSI mask PCI: xilinx-nwl: Expand error logging Conflicts: drivers/pci/host/pcie-xilinx.c
11 parents 930ffc0 + 8b22335 + 6c8b120 + b58ddf1 + 639c532 + a5b45b7 + 8116acc + b3327f7 + ca19890 + c460af9 + 9413d96 commit 69a06e4

21 files changed

+1925
-224
lines changed

Documentation/devicetree/bindings/pci/designware-pcie.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Required properties:
1717
- num-lanes: number of lanes to use
1818

1919
Optional properties:
20+
- num-viewport: number of view ports configured in hardware. If a platform
21+
does not specify it, the driver assumes 2.
2022
- num-lanes: number of lanes to use (this property should be specified unless
2123
the link is brought already up in BIOS)
2224
- reset-gpio: gpio pin number of power good signal
@@ -44,4 +46,5 @@ Example configuration:
4446
interrupts = <25>, <24>;
4547
#interrupt-cells = <1>;
4648
num-lanes = <1>;
49+
num-viewport = <3>;
4750
};
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
* Rockchip AXI PCIe Root Port Bridge DT description
2+
3+
Required properties:
4+
- #address-cells: Address representation for root ports, set to <3>
5+
- #size-cells: Size representation for root ports, set to <2>
6+
- #interrupt-cells: specifies the number of cells needed to encode an
7+
interrupt source. The value must be 1.
8+
- compatible: Should contain "rockchip,rk3399-pcie"
9+
- reg: Two register ranges as listed in the reg-names property
10+
- reg-names: Must include the following names
11+
- "axi-base"
12+
- "apb-base"
13+
- clocks: Must contain an entry for each entry in clock-names.
14+
See ../clocks/clock-bindings.txt for details.
15+
- clock-names: Must include the following entries:
16+
- "aclk"
17+
- "aclk-perf"
18+
- "hclk"
19+
- "pm"
20+
- msi-map: Maps a Requester ID to an MSI controller and associated
21+
msi-specifier data. See ./pci-msi.txt
22+
- phys: From PHY bindings: Phandle for the Generic PHY for PCIe.
23+
- phy-names: MUST be "pcie-phy".
24+
- interrupts: Three interrupt entries must be specified.
25+
- interrupt-names: Must include the following names
26+
- "sys"
27+
- "legacy"
28+
- "client"
29+
- resets: Must contain five entries for each entry in reset-names.
30+
See ../reset/reset.txt for details.
31+
- reset-names: Must include the following names
32+
- "core"
33+
- "mgmt"
34+
- "mgmt-sticky"
35+
- "pipe"
36+
- pinctrl-names : The pin control state names
37+
- pinctrl-0: The "default" pinctrl state
38+
- #interrupt-cells: specifies the number of cells needed to encode an
39+
interrupt source. The value must be 1.
40+
- interrupt-map-mask and interrupt-map: standard PCI properties
41+
42+
Optional Property:
43+
- ep-gpios: contain the entry for pre-reset gpio
44+
- num-lanes: number of lanes to use
45+
- vpcie3v3-supply: The phandle to the 3.3v regulator to use for PCIe.
46+
- vpcie1v8-supply: The phandle to the 1.8v regulator to use for PCIe.
47+
- vpcie0v9-supply: The phandle to the 0.9v regulator to use for PCIe.
48+
49+
*Interrupt controller child node*
50+
The core controller provides a single interrupt for legacy INTx. The PCIe node
51+
should contain an interrupt controller node as a target for the PCI
52+
'interrupt-map' property. This node represents the domain at which the four
53+
INTx interrupts are decoded and routed.
54+
55+
56+
Required properties for Interrupt controller child node:
57+
- interrupt-controller: identifies the node as an interrupt controller
58+
- #address-cells: specifies the number of cells needed to encode an
59+
address. The value must be 0.
60+
- #interrupt-cells: specifies the number of cells needed to encode an
61+
interrupt source. The value must be 1.
62+
63+
Example:
64+
65+
pcie0: pcie@f8000000 {
66+
compatible = "rockchip,rk3399-pcie";
67+
#address-cells = <3>;
68+
#size-cells = <2>;
69+
clocks = <&cru ACLK_PCIE>, <&cru ACLK_PERF_PCIE>,
70+
<&cru PCLK_PCIE>, <&cru SCLK_PCIE_PM>;
71+
clock-names = "aclk", "aclk-perf",
72+
"hclk", "pm";
73+
bus-range = <0x0 0x1>;
74+
interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH 0>,
75+
<GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH 0>,
76+
<GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH 0>;
77+
interrupt-names = "sys", "legacy", "client";
78+
assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
79+
assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
80+
assigned-clock-rates = <100000000>;
81+
ep-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
82+
ranges = <0x83000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x600000
83+
0x81000000 0x0 0xfa600000 0x0 0xfa600000 0x0 0x100000>;
84+
num-lanes = <4>;
85+
msi-map = <0x0 &its 0x0 0x1000>;
86+
reg = <0x0 0xf8000000 0x0 0x2000000>, <0x0 0xfd000000 0x0 0x1000000>;
87+
reg-names = "axi-base", "apb-base";
88+
resets = <&cru SRST_PCIE_CORE>, <&cru SRST_PCIE_MGMT>,
89+
<&cru SRST_PCIE_MGMT_STICKY>, <&cru SRST_PCIE_PIPE>;
90+
reset-names = "core", "mgmt", "mgmt-sticky", "pipe";
91+
phys = <&pcie_phy>;
92+
phy-names = "pcie-phy";
93+
pinctrl-names = "default";
94+
pinctrl-0 = <&pcie_clkreq>;
95+
#interrupt-cells = <1>;
96+
interrupt-map-mask = <0 0 0 7>;
97+
interrupt-map = <0 0 0 1 &pcie0_intc 0>,
98+
<0 0 0 2 &pcie0_intc 1>,
99+
<0 0 0 3 &pcie0_intc 2>,
100+
<0 0 0 4 &pcie0_intc 3>;
101+
pcie0_intc: interrupt-controller {
102+
interrupt-controller;
103+
#address-cells = <0>;
104+
#interrupt-cells = <1>;
105+
};
106+
};

MAINTAINERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9083,6 +9083,15 @@ S: Maintained
90839083
F: Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
90849084
F: drivers/pci/host/pcie-hisi.c
90859085

9086+
PCIE DRIVER FOR ROCKCHIP
9087+
M: Shawn Lin <[email protected]>
9088+
M: Wenrui Li <[email protected]>
9089+
9090+
9091+
S: Maintained
9092+
F: Documentation/devicetree/bindings/pci/rockchip-pcie.txt
9093+
F: drivers/pci/host/pcie-rockchip.c
9094+
90869095
PCIE DRIVER FOR QUALCOMM MSM
90879096
M: Stanimir Varbanov <[email protected]>
90889097

arch/microblaze/pci/pci-common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,10 +632,10 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose,
632632
}
633633
}
634634

635-
/* Decide whether to display the domain number in /proc */
635+
/* Display the domain number in /proc */
636636
int pci_proc_domain(struct pci_bus *bus)
637637
{
638-
return 0;
638+
return pci_domain_nr(bus);
639639
}
640640

641641
/* This header fixup will do the resource fixup for all devices as they are

drivers/pci/host/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,4 +274,15 @@ config PCIE_ARTPEC6
274274
Say Y here to enable PCIe controller support on Axis ARTPEC-6
275275
SoCs. This PCIe controller uses the DesignWare core.
276276

277+
config PCIE_ROCKCHIP
278+
bool "Rockchip PCIe controller"
279+
depends on ARCH_ROCKCHIP
280+
depends on OF
281+
depends on PCI_MSI_IRQ_DOMAIN
282+
select MFD_SYSCON
283+
help
284+
Say Y here if you want internal PCI support on Rockchip SoC.
285+
There is 1 internal PCIe port available to support GEN2 with
286+
4 slots.
287+
277288
endmenu

drivers/pci/host/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ obj-$(CONFIG_PCI_HOST_THUNDER_ECAM) += pci-thunder-ecam.o
3131
obj-$(CONFIG_PCI_HOST_THUNDER_PEM) += pci-thunder-pem.o
3232
obj-$(CONFIG_PCIE_ARMADA_8K) += pcie-armada8k.o
3333
obj-$(CONFIG_PCIE_ARTPEC6) += pcie-artpec6.o
34+
obj-$(CONFIG_PCIE_ROCKCHIP) += pcie-rockchip.o

drivers/pci/host/pci-aardvark.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -927,10 +927,8 @@ static int advk_pcie_probe(struct platform_device *pdev)
927927

928928
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
929929
pcie->base = devm_ioremap_resource(&pdev->dev, res);
930-
if (IS_ERR(pcie->base)) {
931-
dev_err(&pdev->dev, "Failed to map registers\n");
930+
if (IS_ERR(pcie->base))
932931
return PTR_ERR(pcie->base);
933-
}
934932

935933
irq = platform_get_irq(pdev, 0);
936934
ret = devm_request_irq(&pdev->dev, irq, advk_pcie_irq_handler,

drivers/pci/host/pci-exynos.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,12 +425,15 @@ static void exynos_pcie_enable_interrupts(struct pcie_port *pp)
425425
exynos_pcie_msi_init(pp);
426426
}
427427

428-
static inline void exynos_pcie_readl_rc(struct pcie_port *pp,
429-
void __iomem *dbi_base, u32 *val)
428+
static inline u32 exynos_pcie_readl_rc(struct pcie_port *pp,
429+
void __iomem *dbi_base)
430430
{
431+
u32 val;
432+
431433
exynos_pcie_sideband_dbi_r_mode(pp, true);
432-
*val = readl(dbi_base);
434+
val = readl(dbi_base);
433435
exynos_pcie_sideband_dbi_r_mode(pp, false);
436+
return val;
434437
}
435438

436439
static inline void exynos_pcie_writel_rc(struct pcie_port *pp,

0 commit comments

Comments
 (0)