OSDN Git Service

PCI: iproc: Add inbound DMA mapping support
authorRay Jui <ray.jui@broadcom.com>
Tue, 1 Nov 2016 00:38:39 +0000 (17:38 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 17 Nov 2016 20:40:37 +0000 (14:40 -0600)
commitdd9d4e7498de37d79f00cfe562db1daf77bc2651
tree65eeb77e160e2018f758be89b04c1b830c9f7dd6
parent3589c66cca7f0fd76861b40e7ca7d01c82bfe9c3
PCI: iproc: Add inbound DMA mapping support

Add support for inbound DMA mapping.  The range of the inbound mapping is
configured by the optional device tree property 'dma-ranges'.

While inbound mapping is done automatically in the ASIC on most iProc-based
SoCs, newer ASICs (e.g., Stingray) require inbound mapping to be configured
explicitly in software.

[bhelgaas: fold in fixes to avoid 32-bit division in iproc_pcie_ib_write()
and uninitialized return value in iproc_pcie_setup_ib() from Arnd Bergmann
<arnd@arndb.de>]
Signed-off-by: Oza Oza <oza.oza@broadcom.com>
Signed-off-by: Ray Jui <ray.jui@broadcom.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
drivers/pci/host/pcie-iproc.c
drivers/pci/host/pcie-iproc.h