Skip to content

PCI: Another round of host clean-ups

Rob Herring linux-arm-kernel linux-mediatek linux-pci linux-renesas-soc linux-rockchip linux-tegra 1 version Applied

Status from this message: Applied to pci/misc with Bjorn's ACK - I had to tweak:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest19 patches 18 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/19PCI: versatile: Drop flag PCI_ENABLE_PROC_DOMAINSdrivers/pci/controller/pci-versatile.c+0 -10 replies
2/19PCI: Set default bridge parent devicedrivers/pci/controller/cadence/pcie-cadence-host.c drivers/pci/controller/dwc/pcie-designware-host.c drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +18 more+2 -210 replies
3/19PCI: Drop unnecessary zeroing of bridge fieldsdrivers/pci/controller/pci-aardvark.c drivers/pci/controller/pci-ftpci100.c drivers/pci/controller/pci-mvebu.c +7 more+0 -130 replies
4/19PCI: aardvark: Use pci_is_root_bus() to check if bus is root busdrivers/pci/controller/pci-aardvark.c+6 -70 replies
5/19PCI: designware: Use pci_is_root_bus() to check if bus is root busdrivers/pci/controller/dwc/pci-imx6.c drivers/pci/controller/dwc/pci-keystone.c drivers/pci/controller/dwc/pcie-designware-host.c +1 more+10 -150 replies
6/19PCI: mobiveil: Use pci_is_root_bus() to check if bus is root busdrivers/pci/controller/mobiveil/pcie-mobiveil-host.c drivers/pci/controller/mobiveil/pcie-mobiveil.h+3 -80 replies
7/19PCI: xilinx-nwl: Use pci_is_root_bus() to check if bus is root busdrivers/pci/controller/pcie-xilinx-nwl.c+3 -70 replies
8/19PCI: xilinx: Use pci_is_root_bus() to check if bus is root busdrivers/pci/controller/pcie-xilinx.c+4 -70 replies
9/19PCI: rockchip: Use pci_is_root_bus() to check if bus is root busdrivers/pci/controller/pcie-rockchip-host.c drivers/pci/controller/pcie-rockchip.h+7 -110 replies
10/19PCI: rcar: Use pci_is_root_bus() to check if bus is root busdrivers/pci/controller/pcie-rcar-host.c+5 -140 replies
11/19PCI: Move setting pci_host_bridge.busnr out of host driversdrivers/pci/controller/dwc/pcie-designware-host.c drivers/pci/controller/dwc/pcie-designware.h drivers/pci/controller/pci-aardvark.c +6 more+5 -223 replies
12/19PCI: cadence: Use bridge resources for outbound window setupdrivers/pci/controller/cadence/pcie-cadence-host.c+16 -210 replies
13/19PCI: cadence: Remove private bus number and range storagedrivers/pci/controller/cadence/pcie-cadence-ep.c drivers/pci/controller/cadence/pcie-cadence-host.c drivers/pci/controller/cadence/pcie-cadence.c +1 more+24 -260 replies
14/19PCI: rcar: Use devm_pci_alloc_host_bridge()drivers/pci/controller/pcie-rcar-host.c+2 -50 replies
15/19PCI: rcar: Use struct pci_host_bridge.windows list directlydrivers/pci/controller/pcie-rcar-host.c+4 -410 replies
16/19PCI: of: Reduce missing non-prefetchable memory region to a warningdrivers/pci/of.c+3 -40 replies
17/19PCI: rcar-gen2: Convert to use modern host bridge probe functionsdrivers/pci/controller/pci-rcar-gen2.c+46 -1222 replies
18/19PCI: Move DT resource setup into devm_pci_alloc_host_bridge()drivers/pci/controller/cadence/pcie-cadence-host.c drivers/pci/controller/dwc/pcie-designware-host.c drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +21 more+36 -1550 replies
19/19PCI: Set bridge map_irq and swizzle_irq to default functionsdrivers/pci/controller/cadence/pcie-cadence-host.c drivers/pci/controller/dwc/pcie-designware-host.c drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +18 more+5 -379 replies

Reviews trailers per patch

None of the 19 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBjorn Helgaas
SeriesA-b
1/19
2/19
3/19
4/19
5/19
6/19
7/19
8/19
9/19
10/19
11/19
12/19
13/19
14/19
15/19
16/19
17/19
18/19
19/19

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/19] PCI: Another round of host clean-ups

Here's another round PCI host bridge clean-ups. This one aims to reduce the amount of duplication in host probe functions by providing more default initialization of the pci_host_bridge. With the prior clean-ups, it's now possible to alloc and initialize the pci_host_bridge struct from DT in one step.

Patches 2 and 3 drop some pci_host_bridge init. Patches 4-11 clean-up handling of root bus number and bus ranges. Patches 12 and 13 are cleanups for Cadence driver. Patches 14 and 15 are clean-ups for rCar driver. Patch 16 makes missing non-prefetchable region just a warning instead of an error in order to work with rcar-gen2. Patch 17 converts rcar-gen2 to not use the arm32 specific PCI setup. Patch 18 updates how the DT resource parsing is done for all the controller drivers. Any other new controller drivers will need updating. Patch 19 moves the default IRQ mapping to the bridge init core code.

This is based on my previous series of clean-ups[1].

Compile tested only. Any testing would be appreciated as I don't have any of this h/w (well, I have a rock960c, but have not gotten PCIe to work on it).

Rob

[1] https://lore.kernel.org/linux-pci/20200522234832.954484-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org/

Rob Herring (19):
PCI: versatile: Drop flag PCI_ENABLE_PROC_DOMAINS
PCI: Set default bridge parent device
PCI: Drop unnecessary zeroing of bridge fields
PCI: aardvark: Use pci_is_root_bus() to check if bus is root bus
PCI: designware: Use pci_is_root_bus() to check if bus is root bus
PCI: mobiveil: Use pci_is_root_bus() to check if bus is root bus
PCI: xilinx-nwl: Use pci_is_root_bus() to check if bus is root bus
PCI: xilinx: Use pci_is_root_bus() to check if bus is root bus
PCI: rockchip: Use pci_is_root_bus() to check if bus is root bus
PCI: rcar: Use pci_is_root_bus() to check if bus is root bus
PCI: Move setting pci_host_bridge.busnr out of host drivers
PCI: cadence: Use bridge resources for outbound window setup
PCI: cadence: Remove private bus number and range storage
PCI: rcar: Use devm_pci_alloc_host_bridge()
PCI: rcar: Use struct pci_host_bridge.windows list directly
PCI: of: Reduce missing non-prefetchable memory region to a warning
PCI: rcar-gen2: Convert to use modern host bridge probe functions
PCI: Move DT resource setup into devm_pci_alloc_host_bridge()
PCI: Set bridge map_irq and swizzle_irq to default functions

 .../pci/controller/cadence/pcie-cadence-ep.c  |   6 +-
 .../controller/cadence/pcie-cadence-host.c    |  65 +++----
 drivers/pci/controller/cadence/pcie-cadence.c |   9 +-
 drivers/pci/controller/cadence/pcie-cadence.h |   8 +-
 drivers/pci/controller/dwc/pci-imx6.c         |   2 +-
 drivers/pci/controller/dwc/pci-keystone.c     |   4 +-
 .../pci/controller/dwc/pcie-designware-host.c |  28 +--
 drivers/pci/controller/dwc/pcie-designware.h  |   2 -
 .../controller/mobiveil/pcie-mobiveil-host.c  |  21 +--
 .../pci/controller/mobiveil/pcie-mobiveil.h   |   1 -
 drivers/pci/controller/pci-aardvark.c         |  25 +--
 drivers/pci/controller/pci-ftpci100.c         |  10 --
 drivers/pci/controller/pci-host-common.c      |  17 +-
 drivers/pci/controller/pci-loongson.c         |   8 -
 drivers/pci/controller/pci-mvebu.c            |   4 -
 drivers/pci/controller/pci-rcar-gen2.c        | 162 +++++-------------
 drivers/pci/controller/pci-tegra.c            |  10 --
 drivers/pci/controller/pci-v3-semi.c          |  12 --
 drivers/pci/controller/pci-versatile.c        |  13 +-
 drivers/pci/controller/pci-xgene.c            |   9 -
 drivers/pci/controller/pcie-altera.c          |  10 --
 drivers/pci/controller/pcie-brcmstb.c         |   9 -
 drivers/pci/controller/pcie-iproc-platform.c  |  10 +-
 drivers/pci/controller/pcie-iproc.c           |   3 -
 drivers/pci/controller/pcie-mediatek.c        |  16 --
 drivers/pci/controller/pcie-rcar-host.c       |  73 +-------
 drivers/pci/controller/pcie-rockchip-host.c   |  24 +--
 drivers/pci/controller/pcie-rockchip.h        |   1 -
 drivers/pci/controller/pcie-xilinx-nwl.c      |  20 +--
 drivers/pci/controller/pcie-xilinx.c          |  22 +--
 drivers/pci/of.c                              |  45 +++--
 drivers/pci/pci.h                             |   8 +
 drivers/pci/probe.c                           |   7 +
 include/linux/pci.h                           |  12 --
 34 files changed, 160 insertions(+), 516 deletions(-)