devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 00/11] PCI: Add support to the Cadence PCIe controller
@ 2018-01-28 20:40 Cyrille Pitchen
       [not found] ` <cover.1517170521.git.cyrille.pitchen-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Cyrille Pitchen @ 2018-01-28 20:40 UTC (permalink / raw)
  To: bhelgaas, kishon, lorenzo.pieralisi, linux-pci
  Cc: adouglas, stelford, dgary, kgopi, eandrews, thomas.petazzoni,
	sureshp, nsekhar, linux-kernel, robh, devicetree,
	Cyrille Pitchen

Hi all,

this series of patches adds support to the Cadence PCIe controller.
It was tested on a ARM64 platform emulated by a Palladium running the
pci-next kernel.

The host mode was tested with some PCIe devices connected to the Palladium
through a speed-bridge. Some of those devices were a USB host controller
and a SATA controller. The PCIe host controller was also tested with a
second controller configured in endpoint mode and connected back to back
to the first controller.

The EndPoint Controller (EPC) driver was tested with 2 PCI functions, both
handled by the pci-epf-test driver, using the pcitest userspace program.
I used the "-D" optional command line parameter to select the proper PCI
function.

Best regards,

Cyrille

ChangeLog

v4 -> v5:
- rebase on today's (20180128) linux-pci/next
- add again the endpoint driver

- Patch 7:
 move host driver from drivers/pci/cadence into drivers/pci/host and remove
 all references to the endpoint mode, as requested by Lorenzo.
 The host driver will be moved back into drivers/pci/cadence by Patch 11

- Patch 8:
 fix comparison of func_no to BAR5: compare to epc->max_functions

- Patch 9:
 add new patch to fix support of PCI multi-function devices

- Patch 10:
 change the 'cdns,max-outbound-regions' from optional to mandatory as requested
 by Kishon.

- Patch 11:
 take Kishon's comments into account as much as I could.

- Other patches: unchanged


v3 -> v4:
- split patch 3 from v3 into patches 3 and 4.
- remove unused cdns_pcie_reset_outbound_region() from old patch 6
  (new patch 7).
- other patches are unchanged.

v2 -> v3:

- rebase on today's linux-pci/next (20180110) 

patch1:
- rework the commit message of patch 1 and add two new comments on why endpoint
  library users must be linked after the endpoint library itself and why
  the dwc rule uses obj-y instead of obj-$(CONFIG_PCIE_CONFIG_DW).
- update patch 1 to add missing ifdef CONFIG_PCI / endif in
  drivers/pci/dwc/Makefile around the obj-$(CONFIG_ARM64) += pcie-hisi.o rule,
  like for the other obj-$(CONFIG_ARM64) rules in drivers/pci/host/Makefile.

patch2: unchanged

patch3:
- update patch 3 so the bridge hooks/members initialization is left to the
  host bridges probe routines.

patch4: unchanged

patch5:
- collect 'Reviewed-by' tag from Rob Herring for the DT bindings.

patch6:
- remove explanation in the commit message on why obj-$(CONFIG_PCIE_CANDENCE) is
  placed after obj-$(CONFIG_PCI_ENDPOINT) in drivers/pci/Makefile since a
  comment on it has been added into patch1.
- remove menuconfig PCI_CADENCE in drivers/pci/cadence/Kconfig to match
  drivers/pci/dwc/Kconfig.
- adapt patch6 to the changes done in patch3 for the pci_host_probe() function.

v1 -> v2:
- add new properties in the device-tree bindings: 'cdns,max-outbound-regions'
  and 'cdns,no-bar-match-nbits'.
- add a new patch to regroup all makefile rules in drivers/pci/Makefile, hence
  cleaning drivers/Makefile up.
- change the license text to use the recommanded format:
  // SPDX-License-Identifier: GPL-2.0
- add a new patch updating the API of the EPC library to add support to
  multi-function devices.
- add a 2 new patches to share more common code between host controller drivers
- remove some useless tests
- add more comments in both drivers.
- fix DT bindings examples
- remove useless init of the primary, secondary and sub-ordinate bus numbers in
  the PCI configuration space of the root port.
- remove cdns_pcie_ep_stop() function and rework cdns_pcie_ep_start() function

Cyrille Pitchen (10):
  PCI: Regroup all PCI related entries into drivers/pci/Makefile
  PCI: OF: Add generic function to parse and allocate PCI resources
  PCI: generic: fix missing call of pci_free_resource_list()
  PCI: Add generic function to probe PCI host controllers
  PCI: Add vendor ID for Cadence
  PCI: cadence: Add host driver for Cadence PCIe controller
  PCI: endpoint: Add the function number as argument to EPC ops
  PCI: endpoint: Fix EPF device name to support multi-function devices
  dt-bindings: PCI: cadence: Add DT bindings for Cadence PCIe endpoint
    controller
  PCI: cadence: Add EndPoint Controller driver for Cadence PCIe
    controller

Scott Telford (1):
  dt-bindings: PCI: cadence: Add DT bindings for Cadence PCIe host
    controller

 .../devicetree/bindings/pci/cdns,cdns-pcie-ep.txt  |  22 +
 .../bindings/pci/cdns,cdns-pcie-host.txt           |  60 +++
 MAINTAINERS                                        |   7 +
 drivers/Makefile                                   |   5 +-
 drivers/pci/Kconfig                                |   2 +
 drivers/pci/Makefile                               |  14 +-
 drivers/pci/cadence/Kconfig                        |  27 +
 drivers/pci/cadence/Makefile                       |   4 +
 drivers/pci/cadence/pcie-cadence-ep.c              | 542 +++++++++++++++++++++
 drivers/pci/cadence/pcie-cadence-host.c            | 336 +++++++++++++
 drivers/pci/cadence/pcie-cadence.c                 | 126 +++++
 drivers/pci/cadence/pcie-cadence.h                 | 311 ++++++++++++
 drivers/pci/dwc/Makefile                           |   2 +
 drivers/pci/dwc/pcie-designware-ep.c               |  20 +-
 drivers/pci/endpoint/functions/pci-epf-test.c      |  41 +-
 drivers/pci/endpoint/pci-ep-cfs.c                  |  46 +-
 drivers/pci/endpoint/pci-epc-core.c                |  62 ++-
 drivers/pci/host/Makefile                          |   2 +
 drivers/pci/host/pci-host-common.c                 |  72 +--
 drivers/pci/of.c                                   |  51 ++
 drivers/pci/probe.c                                |  33 ++
 include/linux/pci-epc.h                            |  43 +-
 include/linux/pci.h                                |  10 +
 include/linux/pci_ids.h                            |   2 +
 24 files changed, 1693 insertions(+), 147 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pci/cdns,cdns-pcie-ep.txt
 create mode 100644 Documentation/devicetree/bindings/pci/cdns,cdns-pcie-host.txt
 create mode 100644 drivers/pci/cadence/Kconfig
 create mode 100644 drivers/pci/cadence/Makefile
 create mode 100644 drivers/pci/cadence/pcie-cadence-ep.c
 create mode 100644 drivers/pci/cadence/pcie-cadence-host.c
 create mode 100644 drivers/pci/cadence/pcie-cadence.c
 create mode 100644 drivers/pci/cadence/pcie-cadence.h

-- 
2.11.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-02-06  9:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-28 20:40 [PATCH v5 00/11] PCI: Add support to the Cadence PCIe controller Cyrille Pitchen
     [not found] ` <cover.1517170521.git.cyrille.pitchen-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2018-01-28 20:40   ` [PATCH v5 01/11] PCI: Regroup all PCI related entries into drivers/pci/Makefile Cyrille Pitchen
2018-01-28 20:40   ` [PATCH v5 02/11] PCI: OF: Add generic function to parse and allocate PCI resources Cyrille Pitchen
2018-01-28 20:40   ` [PATCH v5 03/11] PCI: generic: fix missing call of pci_free_resource_list() Cyrille Pitchen
2018-01-28 20:40   ` [PATCH v5 04/11] PCI: Add generic function to probe PCI host controllers Cyrille Pitchen
2018-01-28 20:40   ` [PATCH v5 05/11] PCI: Add vendor ID for Cadence Cyrille Pitchen
2018-01-28 20:40 ` [PATCH v5 06/11] dt-bindings: PCI: cadence: Add DT bindings for Cadence PCIe host controller Cyrille Pitchen
2018-01-28 20:40 ` [PATCH v5 07/11] PCI: cadence: Add host driver for Cadence PCIe controller Cyrille Pitchen
2018-01-28 20:40 ` [PATCH v5 08/11] PCI: endpoint: Add the function number as argument to EPC ops Cyrille Pitchen
2018-01-28 20:40 ` [PATCH v5 09/11] PCI: endpoint: Fix EPF device name to support multi-function devices Cyrille Pitchen
2018-01-28 20:40 ` [PATCH v5 10/11] dt-bindings: PCI: cadence: Add DT bindings for Cadence PCIe endpoint controller Cyrille Pitchen
2018-01-28 20:40 ` [PATCH v5 11/11] PCI: cadence: Add EndPoint Controller driver for Cadence PCIe controller Cyrille Pitchen
2018-01-28 21:47 ` [PATCH v5 00/11] PCI: Add support to the " Bjorn Helgaas
     [not found]   ` <20180128214741.GA232763-1RhO1Y9PlrlHTL0Zs8A6p5iNqAH0jzoTYJqu5kTmcBRl57MIdRCFDg@public.gmane.org>
2018-01-30 11:41     ` Lorenzo Pieralisi
     [not found]       ` <20180130114155.GA12009-4tUPXFaYRHv6sAKXYmQ0tx/iLCjYCKR+VpNB7YpNyf8@public.gmane.org>
2018-01-30 21:12         ` Cyrille Pitchen
     [not found]           ` <8cec81b2-85c4-d7bf-4171-9e94a745eab0-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2018-02-06  9:39             ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).