Skip to content

Commit

Permalink
PCI: cadence: Add EndPoint Controller driver for Cadence PCIe controller
Browse files Browse the repository at this point in the history
This patch adds support to the Cadence PCIe controller in endpoint mode.

Since pieces of source code are shared with the host driver (Root
Complex mode), we create a new directory under drivers/pci dedicated to
the Cadence PCIe controller. The common code is placed into
drivers/pci/cadence/pcie-cadence.c and used by both the host and
endpoint controller drivers.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@free-electrons.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
  • Loading branch information
Cyrille Pitchen authored and Lorenzo Pieralisi committed Jan 31, 2018
1 parent 6618f4d commit 37dddf1
Show file tree
Hide file tree
Showing 11 changed files with 826 additions and 75 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -10407,7 +10407,7 @@ M: Alan Douglas <adouglas@cadence.com>
L: linux-pci@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/pci/cdns,*.txt
F: drivers/pci/host/pcie-cadence*
F: drivers/pci/cadence/pcie-cadence*

PCI DRIVER FOR FREESCALE LAYERSCAPE
M: Minghuan Lian <minghuan.Lian@freescale.com>
Expand Down
1 change: 1 addition & 0 deletions drivers/pci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ config PCI_HYPERV
PCI devices from a PCI backend to support PCI driver domains.

source "drivers/pci/hotplug/Kconfig"
source "drivers/pci/cadence/Kconfig"
source "drivers/pci/dwc/Kconfig"
source "drivers/pci/host/Kconfig"
source "drivers/pci/endpoint/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/pci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ obj-y += switch/
obj-$(CONFIG_PCI_ENDPOINT) += endpoint/

# Endpoint library must be initialized before its users
obj-$(CONFIG_PCIE_CADENCE) += cadence/
# pcie-hisi.o quirks are needed even without CONFIG_PCIE_DW
obj-y += dwc/
27 changes: 27 additions & 0 deletions drivers/pci/cadence/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
menu "Cadence PCIe controllers support"

config PCIE_CADENCE
bool

config PCIE_CADENCE_HOST
bool "Cadence PCIe host controller"
depends on OF
depends on PCI
select IRQ_DOMAIN
select PCIE_CADENCE
help
Say Y here if you want to support the Cadence PCIe controller in host
mode. This PCIe controller may be embedded into many different vendors
SoCs.

config PCIE_CADENCE_EP
bool "Cadence PCIe endpoint controller"
depends on OF
depends on PCI_ENDPOINT
select PCIE_CADENCE
help
Say Y here if you want to support the Cadence PCIe controller in
endpoint mode. This PCIe controller may be embedded into many
different vendors SoCs.

endmenu
4 changes: 4 additions & 0 deletions drivers/pci/cadence/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_PCIE_CADENCE) += pcie-cadence.o
obj-$(CONFIG_PCIE_CADENCE_HOST) += pcie-cadence-host.o
obj-$(CONFIG_PCIE_CADENCE_EP) += pcie-cadence-ep.o
Loading

0 comments on commit 37dddf1

Please sign in to comment.