PCI: endpoint: Add support to handle multiple base for mapping outbound memory
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Thu, 7 May 2020 12:33:16 +0000 (13:33 +0100)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 22 May 2020 11:35:07 +0000 (12:35 +0100)
commitd45e3c1a5979efd40dbbac9a5c3586f4fa41f734
treee4d0f58d6e8330796f75cdd995baf001309b6921
parent975cf23e3aa89588cbfc9ad6f2b23bd32af4edc7
PCI: endpoint: Add support to handle multiple base for mapping outbound memory

R-Car PCIe controller has support to map multiple memory regions for
mapping the outbound memory in local system also the controller limits
single allocation for each region (that is, once a chunk is used from the
region it cannot be used to allocate a new one). This features inspires to
add support for handling multiple memory bases in endpoint framework.

With this patch pci_epc_mem_init() initializes address space for endpoint
controller which support single window and pci_epc_multi_mem_init()
initializes multiple windows supported by endpoint controller.

Link: https://lore.kernel.org/r/1588854799-13710-6-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/pci/controller/dwc/pcie-designware-ep.c
drivers/pci/endpoint/pci-epc-mem.c
include/linux/pci-epc.h