mbox series

[v8,0/1] PCI: microchip: Add host driver for Microchip PCIe controller

Message ID a71cee05633ffac508366d66ca23a467716b14b7.camel@microchip.com
Headers show
Series PCI: microchip: Add host driver for Microchip PCIe controller | expand

Message

Daire McNamara April 29, 2020, 9:37 a.m. UTC
This v8 patch adds support for the Microchip PCIe PolarFire PCIe
controller when configured in host (Root Complex) mode.

Updates since v7:
* Build for 64bit RISCV architecture only

Updates since v6:
* Refactored to use common eCAM driver
* Updated to CONFIG_PCIE_MICROCHIP_HOST etc
* Formatting improvements
* Removed code for selection between bridge 0 and 1

Updates since v5:
* Fixed Kconfig typo noted by Randy Dunlap
* Updated with comments from Bjorn Helgaas

Updates since v4:
* Fix compile issues.

Updates since v3:
* Update all references to Microsemi to Microchip
* Separate MSI functionality from legacy PCIe interrupt handling functionality

Updates since v2:
* Split out DT bindings and Vendor ID updates into their own patch
  from PCIe driver.
* Updated Change Log

Updates since v1:
* Incorporate feedback from Bjorn Helgaas

Daire McNamara (1):
  PCI: microchip: Add host driver for Microchip PCIe controller

 .../bindings/pci/microchip-pcie.txt           |  64 ++
 drivers/pci/controller/Kconfig                |   9 +
 drivers/pci/controller/Makefile               |   1 +
 drivers/pci/controller/pcie-microchip-host.c  | 702 ++++++++++++++++++
 4 files changed, 776 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pci/microchip-pcie.txt
 create mode 100644 drivers/pci/controller/pcie-microchip-host.c


base-commit: c0cc271173b2e1c2d8d0ceaef14e4dfa79eefc0d
--
2.17.1

Comments

Christoph Hellwig April 29, 2020, 11:11 a.m. UTC | #1
On Wed, Apr 29, 2020 at 09:37:49AM +0000, Daire.McNamara@microchip.com wrote:
> This v8 patch adds support for the Microchip PCIe PolarFire PCIe
> controller when configured in host (Root Complex) mode.
> 
> Updates since v7:
> * Build for 64bit RISCV architecture only

why?
Daire McNamara April 29, 2020, 2:44 p.m. UTC | #2
On Wed, 2020-04-29 at 04:11 -0700, Christoph Hellwig wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Wed, Apr 29, 2020 at 09:37:49AM +0000, 
> Daire.McNamara@microchip.com wrote:
> > This v8 patch adds support for the Microchip PCIe PolarFire PCIe
> > controller when configured in host (Root Complex) mode.
> > 
> > Updates since v7:
> > * Build for 64bit RISCV architecture only
> 
> why?
The PCIe hardware is only available on 64-bit RISCV based platforms at the moment.  Our intention is to extend the driver, at a later date, as and when the hardware becomes available.
Christoph Hellwig April 29, 2020, 2:57 p.m. UTC | #3
On Wed, Apr 29, 2020 at 02:44:05PM +0000, Daire.McNamara@microchip.com wrote:
> > why?
> The PCIe hardware is only available on 64-bit RISCV based platforms at the moment.  Our intention is to extend the driver, at a later date, as and when the hardware becomes available.
> 

I'll let the actual PCIe maintainer speak, but normally we try to
allow drivers to build on all platforms unless they have an actual
code platform depency.  And as far as I can tell this driver doesn't
actually depend on RISC-V specific code.
Bjorn Helgaas April 29, 2020, 3:15 p.m. UTC | #4
On Wed, Apr 29, 2020 at 07:57:03AM -0700, Christoph Hellwig wrote:
> On Wed, Apr 29, 2020 at 02:44:05PM +0000, Daire.McNamara@microchip.com wrote:
> > > why?
> > The PCIe hardware is only available on 64-bit RISCV based
> > platforms at the moment.  Our intention is to extend the driver,
> > at a later date, as and when the hardware becomes available.
> 
> I'll let the actual PCIe maintainer speak, but normally we try to
> allow drivers to build on all platforms unless they have an actual
> code platform depency.  And as far as I can tell this driver doesn't
> actually depend on RISC-V specific code.

Agreed; if the driver doesn't actually depend on interfaces that are
RISC-V-specific, we should be able to compile-test it on other arches.

Bjorn