Skip to content

Commit e1aa9df

Browse files
committed
Merge tag 'pci-v6.8-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull pci updates from Bjorn Helgaas: "Enumeration: - Reserve ECAM so we don't assign it to PCI BARs; this works around bugs where BIOS included ECAM in a PNP0A03 host bridge window, didn't reserve it via a PNP0C02 motherboard device, and didn't allocate space for SR-IOV VF BARs (Bjorn Helgaas) - Add MMCONFIG/ECAM debug logging (Bjorn Helgaas) - Rename 'MMCONFIG' to 'ECAM' to match spec usage (Bjorn Helgaas) - Log device type (Root Port, Switch Port, etc) during enumeration (Bjorn Helgaas) - Log bridges before downstream devices so the dmesg order is more logical (Bjorn Helgaas) - Log resource names (BAR 0, VF BAR 0, bridge window, etc) consistently instead of a mix of names and "reg 0x10" (Puranjay Mohan, Bjorn Helgaas) - Fix 64GT/s effective data rate calculation to use 1b/1b encoding rather than the 8b/10b or 128b/130b used by lower rates (Ilpo Järvinen) - Use PCI_HEADER_TYPE_* instead of literals in x86, powerpc, SCSI lpfc (Ilpo Järvinen) - Clean up open-coded PCIBIOS return code mangling (Ilpo Järvinen) Resource management: - Restructure pci_dev_for_each_resource() to avoid computing the address of an out-of-bounds array element (the bounds check was performed later so the element was never actually *read*, but it's nicer to avoid even computing an out-of-bounds address) (Andy Shevchenko) Driver binding: - Convert pci-host-common.c platform .remove() callback to .remove_new() returning 'void' since it's not useful to return error codes here (Uwe Kleine-König) - Convert exynos, keystone, kirin from .remove() to .remove_new(), which returns void instead of int (Uwe Kleine-König) - Drop unused struct pci_driver.node member (Mathias Krause) Virtualization: - Add ACS quirk for more Zhaoxin Root Ports (LeoLiuoc) Error handling: - Log AER errors as "Correctable" (not "Corrected") or "Uncorrectable" to match spec terminology (Bjorn Helgaas) - Decode Requester ID when no error info found instead of printing the raw hex value (Bjorn Helgaas) Endpoint framework: - Use a unique test pattern for each BAR in the pci_endpoint_test to make it easier to debug address translation issues (Niklas Cassel) Broadcom STB PCIe controller driver: - Add DT property "brcm,clkreq-mode" and driver support for different CLKREQ# modes to make ASPM L1.x states possible (Jim Quinlan) Freescale Layerscape PCIe controller driver: - Add suspend/resume support for Layerscape LS1043a and LS1021a, including software-managed PME_Turn_Off and transitions between L0, L2/L3_Ready Link states (Frank Li) MediaTek PCIe controller driver: - Clear MSI interrupt status before handler to avoid missing MSIs that occur after the handler (qizhong cheng) MediaTek PCIe Gen3 controller driver: - Update mediatek-gen3 translation window setup to handle MMIO space that is not a power of two in size (Jianjun Wang) Qualcomm PCIe controller driver: - Increase qcom iommu-map maxItems to accommodate SDX55 (five entries) and SDM845 (sixteen entries) (Krzysztof Kozlowski) - Describe qcom,pcie-sc8180x clocks and resets accurately (Krzysztof Kozlowski) - Describe qcom,pcie-sm8150 clocks and resets accurately (Krzysztof Kozlowski) - Correct the qcom "reset-name" property, previously incorrectly called "reset-names" (Krzysztof Kozlowski) - Document qcom,pcie-sm8650, based on qcom,pcie-sm8550 (Neil Armstrong) Renesas R-Car PCIe controller driver: - Replace of_device.h with explicit of.h include to untangle header usage (Rob Herring) - Add DT and driver support for optional miniPCIe 1.5v and 3.3v regulators on KingFisher (Wolfram Sang) SiFive FU740 PCIe controller driver: - Convert fu740 CONFIG_PCIE_FU740 dependency from SOC_SIFIVE to ARCH_SIFIVE (Conor Dooley) Synopsys DesignWare PCIe controller driver: - Align iATU mapping for endpoint MSI-X (Niklas Cassel) - Drop "host_" prefix from struct dw_pcie_host_ops members (Yoshihiro Shimoda) - Drop "ep_" prefix from struct dw_pcie_ep_ops members (Yoshihiro Shimoda) - Rename struct dw_pcie_ep_ops.func_conf_select() to .get_dbi_offset() to be more descriptive (Yoshihiro Shimoda) - Add Endpoint DBI accessors to encapsulate offset lookups (Yoshihiro Shimoda) TI J721E PCIe driver: - Add j721e DT and driver support for 'num-lanes' for devices that support x1, x2, or x4 Links (Matt Ranostay) - Add j721e DT compatible strings and driver support for j784s4 (Matt Ranostay) - Make TI J721E Kconfig depend on ARCH_K3 since the hardware is specific to those TI SoC parts (Peter Robinson) TI Keystone PCIe controller driver: - Hold power management references to all PHYs while enabling them to avoid a race when one provides clocks to others (Siddharth Vadapalli) Xilinx XDMA PCIe controller driver: - Remove redundant dev_err(), since platform_get_irq() and platform_get_irq_byname() already log errors (Yang Li) - Fix uninitialized symbols in xilinx_pl_dma_pcie_setup_irq() (Krzysztof Wilczyński) - Fix xilinx_pl_dma_pcie_init_irq_domain() error return when irq_domain_add_linear() fails (Harshit Mogalapalli) MicroSemi Switchtec management driver: - Do dma_mrpc cleanup during switchtec_pci_remove() to match its devm ioremapping in switchtec_pci_probe(). Previously the cleanup was done in stdev_release(), which used stale pointers if stdev->cdev happened to be open when the PCI device was removed (Daniel Stodden) Miscellaneous: - Convert interrupt terminology from "legacy" to "INTx" to be more specific and match spec terminology (Damien Le Moal) - In dw-xdata-pcie, pci_endpoint_test, and vmd, replace usage of deprecated ida_simple_*() API with ida_alloc() and ida_free() (Christophe JAILLET)" * tag 'pci-v6.8-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (97 commits) PCI: Fix kernel-doc issues PCI: brcmstb: Configure HW CLKREQ# mode appropriate for downstream device dt-bindings: PCI: brcmstb: Add property "brcm,clkreq-mode" PCI: mediatek-gen3: Fix translation window size calculation PCI: mediatek: Clear interrupt status before dispatching handler PCI: keystone: Fix race condition when initializing PHYs PCI: xilinx-xdma: Fix error code in xilinx_pl_dma_pcie_init_irq_domain() PCI: xilinx-xdma: Fix uninitialized symbols in xilinx_pl_dma_pcie_setup_irq() PCI: rcar-gen4: Fix -Wvoid-pointer-to-enum-cast error PCI: iproc: Fix -Wvoid-pointer-to-enum-cast warning PCI: dwc: Add dw_pcie_ep_{read,write}_dbi[2] helpers PCI: dwc: Rename .func_conf_select to .get_dbi_offset in struct dw_pcie_ep_ops PCI: dwc: Rename .ep_init to .init in struct dw_pcie_ep_ops PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members misc: pci_endpoint_test: Use a unique test pattern for each BAR PCI: j721e: Make TI J721E depend on ARCH_K3 PCI: j721e: Add TI J784S4 PCIe configuration PCI/AER: Use explicit register sizes for struct members PCI/AER: Decode Requester ID when no error info found PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for errors ...
2 parents a3f4a07 + 7119ca3 commit e1aa9df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1518
-876
lines changed

Documentation/PCI/boot-interrupts.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Conditions
6161
==========
6262

6363
The use of threaded interrupts is the most likely condition to trigger
64-
this problem today. Threaded interrupts may not be reenabled after the IRQ
64+
this problem today. Threaded interrupts may not be re-enabled after the IRQ
6565
handler wakes. These "one shot" conditions mean that the threaded interrupt
6666
needs to keep the interrupt line masked until the threaded handler has run.
6767
Especially when dealing with high data rate interrupts, the thread needs to

Documentation/PCI/msi-howto.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ including a full 'lspci -v' so we can add the quirks to the kernel.
236236
Disabling MSIs below a bridge
237237
-----------------------------
238238

239-
Some PCI bridges are not able to route MSIs between busses properly.
239+
Some PCI bridges are not able to route MSIs between buses properly.
240240
In this case, MSIs must be disabled on all devices behind the bridge.
241241

242242
Some bridges allow you to enable MSIs by changing some bits in their

Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,24 @@ properties:
6464

6565
aspm-no-l0s: true
6666

67+
brcm,clkreq-mode:
68+
description: A string that determines the operating
69+
clkreq mode of the PCIe RC HW with respect to controlling the refclk
70+
signal. There are three different modes -- "safe", which drives the
71+
refclk signal unconditionally and will work for all devices but does
72+
not provide any power savings; "no-l1ss" -- which provides Clock
73+
Power Management, L0s, and L1, but cannot provide L1 substate (L1SS)
74+
power savings. If the downstream device connected to the RC is L1SS
75+
capable AND the OS enables L1SS, all PCIe traffic may abruptly halt,
76+
potentially hanging the system; "default" -- which provides L0s, L1,
77+
and L1SS, but not compliant to provide Clock Power Management;
78+
specifically, may not be able to meet the T_CLRon max timing of 400ns
79+
as specified in "Dynamic Clock Control", section 3.2.5.2.2 PCI
80+
Express Mini CEM 2.1 specification. This situation is atypical and
81+
should happen only with older devices.
82+
$ref: /schemas/types.yaml#/definitions/string
83+
enum: [ safe, no-l1ss, default ]
84+
6785
brcm,scb-sizes:
6886
description: u64 giving the 64bit PCIe memory
6987
viewport size of a memory controller. There may be up to

Documentation/devicetree/bindings/pci/qcom,pcie.yaml

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ properties:
4141
- qcom,pcie-sm8450-pcie0
4242
- qcom,pcie-sm8450-pcie1
4343
- qcom,pcie-sm8550
44+
- items:
45+
- enum:
46+
- qcom,pcie-sm8650
47+
- const: qcom,pcie-sm8550
4448
- items:
4549
- const: qcom,pcie-msm8998
4650
- const: qcom,pcie-msm8996
@@ -62,7 +66,8 @@ properties:
6266
maxItems: 8
6367

6468
iommu-map:
65-
maxItems: 2
69+
minItems: 1
70+
maxItems: 16
6671

6772
# Common definitions for clocks, clock-names and reset.
6873
# Platform constraints are described later.
@@ -88,7 +93,7 @@ properties:
8893
minItems: 1
8994
maxItems: 12
9095

91-
resets-names:
96+
reset-names:
9297
minItems: 1
9398
maxItems: 12
9499

@@ -478,6 +483,33 @@ allOf:
478483
items:
479484
- const: pci # PCIe core reset
480485

486+
- if:
487+
properties:
488+
compatible:
489+
contains:
490+
enum:
491+
- qcom,pcie-sc8180x
492+
then:
493+
properties:
494+
clocks:
495+
minItems: 8
496+
maxItems: 8
497+
clock-names:
498+
items:
499+
- const: pipe # PIPE clock
500+
- const: aux # Auxiliary clock
501+
- const: cfg # Configuration clock
502+
- const: bus_master # Master AXI clock
503+
- const: bus_slave # Slave AXI clock
504+
- const: slave_q2a # Slave Q2A clock
505+
- const: ref # REFERENCE clock
506+
- const: tbu # PCIe TBU clock
507+
resets:
508+
maxItems: 1
509+
reset-names:
510+
items:
511+
- const: pci # PCIe core reset
512+
481513
- if:
482514
properties:
483515
compatible:
@@ -526,8 +558,33 @@ allOf:
526558
compatible:
527559
contains:
528560
enum:
529-
- qcom,pcie-sc8180x
530561
- qcom,pcie-sm8150
562+
then:
563+
properties:
564+
clocks:
565+
minItems: 8
566+
maxItems: 8
567+
clock-names:
568+
items:
569+
- const: pipe # PIPE clock
570+
- const: aux # Auxiliary clock
571+
- const: cfg # Configuration clock
572+
- const: bus_master # Master AXI clock
573+
- const: bus_slave # Slave AXI clock
574+
- const: slave_q2a # Slave Q2A clock
575+
- const: tbu # PCIe TBU clock
576+
- const: ref # REFERENCE clock
577+
resets:
578+
maxItems: 1
579+
reset-names:
580+
items:
581+
- const: pci # PCIe core reset
582+
583+
- if:
584+
properties:
585+
compatible:
586+
contains:
587+
enum:
531588
- qcom,pcie-sm8250
532589
then:
533590
oneOf:

Documentation/devicetree/bindings/pci/rcar-pci-host.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ properties:
6868
phy-names:
6969
const: pcie
7070

71+
vpcie1v5-supply:
72+
description: The 1.5v regulator to use for PCIe.
73+
74+
vpcie3v3-supply:
75+
description: The 3.3v regulator to use for PCIe.
76+
77+
vpcie12v-supply:
78+
description: The 12v regulator to use for PCIe.
79+
7180
required:
7281
- compatible
7382
- reg
@@ -121,5 +130,7 @@ examples:
121130
clock-names = "pcie", "pcie_bus";
122131
power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
123132
resets = <&cpg 319>;
133+
vpcie3v3-supply = <&pcie_3v3>;
134+
vpcie12v-supply = <&pcie_12v>;
124135
};
125136
};

Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ properties:
4949
- description: APB clock for PCIe
5050
- description: Auxiliary clock for PCIe
5151
- description: PIPE clock
52+
- description: Reference clock for PCIe
5253

5354
clock-names:
5455
minItems: 5
@@ -59,6 +60,7 @@ properties:
5960
- const: pclk
6061
- const: aux
6162
- const: pipe
63+
- const: ref
6264

6365
interrupts:
6466
items:

Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ title: TI J721E PCI EP (PCIe Wrapper)
1010
maintainers:
1111
- Kishon Vijay Abraham I <kishon@ti.com>
1212

13-
allOf:
14-
- $ref: cdns-pcie-ep.yaml#
15-
1613
properties:
1714
compatible:
1815
oneOf:
1916
- const: ti,j721e-pcie-ep
17+
- const: ti,j784s4-pcie-ep
2018
- description: PCIe EP controller in AM64
2119
items:
2220
- const: ti,am64-pcie-ep
@@ -65,6 +63,41 @@ properties:
6563
items:
6664
- const: link_state
6765

66+
allOf:
67+
- $ref: cdns-pcie-ep.yaml#
68+
- if:
69+
properties:
70+
compatible:
71+
enum:
72+
- ti,am64-pcie-ep
73+
then:
74+
properties:
75+
num-lanes:
76+
const: 1
77+
78+
- if:
79+
properties:
80+
compatible:
81+
enum:
82+
- ti,j7200-pcie-ep
83+
- ti,j721e-pcie-ep
84+
then:
85+
properties:
86+
num-lanes:
87+
minimum: 1
88+
maximum: 2
89+
90+
- if:
91+
properties:
92+
compatible:
93+
enum:
94+
- ti,j784s4-pcie-ep
95+
then:
96+
properties:
97+
num-lanes:
98+
minimum: 1
99+
maximum: 4
100+
68101
required:
69102
- compatible
70103
- reg

Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ title: TI J721E PCI Host (PCIe Wrapper)
1010
maintainers:
1111
- Kishon Vijay Abraham I <kishon@ti.com>
1212

13-
allOf:
14-
- $ref: cdns-pcie-host.yaml#
15-
1613
properties:
1714
compatible:
1815
oneOf:
1916
- const: ti,j721e-pcie-host
17+
- const: ti,j784s4-pcie-host
2018
- description: PCIe controller in AM64
2119
items:
2220
- const: ti,am64-pcie-host
@@ -94,6 +92,41 @@ properties:
9492
interrupts:
9593
maxItems: 1
9694

95+
allOf:
96+
- $ref: cdns-pcie-host.yaml#
97+
- if:
98+
properties:
99+
compatible:
100+
enum:
101+
- ti,am64-pcie-host
102+
then:
103+
properties:
104+
num-lanes:
105+
const: 1
106+
107+
- if:
108+
properties:
109+
compatible:
110+
enum:
111+
- ti,j7200-pcie-host
112+
- ti,j721e-pcie-host
113+
then:
114+
properties:
115+
num-lanes:
116+
minimum: 1
117+
maximum: 2
118+
119+
- if:
120+
properties:
121+
compatible:
122+
enum:
123+
- ti,j784s4-pcie-host
124+
then:
125+
properties:
126+
num-lanes:
127+
minimum: 1
128+
maximum: 4
129+
97130
required:
98131
- compatible
99132
- reg

Documentation/driver-api/pci/p2pdma.rst

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,9 @@ this to include other types of resources like doorbells.
8383
Client Drivers
8484
--------------
8585

86-
A client driver typically only has to conditionally change its DMA map
87-
routine to use the mapping function :c:func:`pci_p2pdma_map_sg()` instead
88-
of the usual :c:func:`dma_map_sg()` function. Memory mapped in this
89-
way does not need to be unmapped.
90-
91-
The client may also, optionally, make use of
92-
:c:func:`is_pci_p2pdma_page()` to determine when to use the P2P mapping
93-
functions and when to use the regular mapping functions. In some
94-
situations, it may be more appropriate to use a flag to indicate a
95-
given request is P2P memory and map appropriately. It is important to
96-
ensure that struct pages that back P2P memory stay out of code that
97-
does not have support for them as other code may treat the pages as
98-
regular memory which may not be appropriate.
86+
A client driver only has to use the mapping API :c:func:`dma_map_sg()`
87+
and :c:func:`dma_unmap_sg()` functions as usual, and the implementation
88+
will do the right thing for the P2P capable memory.
9989

10090

10191
Orchestrator Drivers

arch/powerpc/sysdev/fsl_pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static void quirk_fsl_pcie_early(struct pci_dev *dev)
5454

5555
/* if we aren't in host mode don't bother */
5656
pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type);
57-
if ((hdr_type & 0x7f) != PCI_HEADER_TYPE_BRIDGE)
57+
if ((hdr_type & PCI_HEADER_TYPE_MASK) != PCI_HEADER_TYPE_BRIDGE)
5858
return;
5959

6060
dev->class = PCI_CLASS_BRIDGE_PCI_NORMAL;
@@ -581,7 +581,7 @@ static int fsl_add_bridge(struct platform_device *pdev, int is_primary)
581581
hose->ops = &fsl_indirect_pcie_ops;
582582
/* For PCIE read HEADER_TYPE to identify controller mode */
583583
early_read_config_byte(hose, 0, 0, PCI_HEADER_TYPE, &hdr_type);
584-
if ((hdr_type & 0x7f) != PCI_HEADER_TYPE_BRIDGE)
584+
if ((hdr_type & PCI_HEADER_TYPE_MASK) != PCI_HEADER_TYPE_BRIDGE)
585585
goto no_bridge;
586586

587587
} else {

0 commit comments

Comments
 (0)