linux/drivers/pci/controller
Kishon Vijay Abraham I 5d3d063abb PCI: cadence: Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property
Cadence PCIe core driver (host mode) uses "cdns,no-bar-match-nbits"
property to configure the number of bits passed through from PCIe
address to internal address in Inbound Address Translation register.
This only used the NO MATCH BAR.

However standard PCI dt-binding already defines "dma-ranges" to
describe the address ranges accessible by PCIe controller. Add support
in Cadence PCIe host driver to parse dma-ranges and configure the
inbound regions for BAR0, BAR1 and NO MATCH BAR. Cadence IP specifies
maximum size for BAR0 as 256GB, maximum size for BAR1 as 2 GB.

This adds support to take the next biggest region in "dma-ranges" and
find the smallest BAR that each of the regions fit in and if there is
no BAR big enough to hold the region, split the region to see if it can
be fitted using multiple BARs.

"dma-ranges" of J721E will be
dma-ranges = <0x02000000 0x0 0x0 0x0 0x0 0x10000 0x0>;
Since there is no BAR which can hold 2^48 size, NO_MATCH_BAR will be
used here.

Legacy device tree binding compatibility is maintained by retaining
support for "cdns,no-bar-match-nbits".

Link: https://lore.kernel.org/r/20200722110317.4744-2-kishon@ti.com
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Rob Herring <robh@kernel.org>
2020-07-27 15:46:02 +01:00
..
cadence PCI: cadence: Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property 2020-07-27 15:46:02 +01:00
dwc Merge branch 'remotes/lorenzo/pci/tegra' 2020-06-04 12:59:19 -05:00
mobiveil PCI: Check for platform_get_irq() failure consistently 2020-05-12 08:14:43 -05:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile pci-v5.8-changes 2020-06-06 11:01:58 -07:00
pci-aardvark.c Merge branch 'remotes/lorenzo/pci/aardvark' 2020-06-04 12:59:14 -05:00
pci-ftpci100.c PCI: ftpci100: Use inbound resources for setup 2019-11-20 17:00:14 +00:00
pci-host-common.c PCI: host-generic: Eliminate pci_host_common_probe wrappers 2020-05-07 09:29:43 +01:00
pci-host-generic.c PCI: host-generic: Eliminate pci_host_common_probe wrappers 2020-05-07 09:29:43 +01:00
pci-hyperv-intf.c PCI: hv: Add a Hyper-V PCI interface driver for software backchannel interface 2019-08-22 00:25:12 -07:00
pci-hyperv.c pci-v5.8-changes 2020-06-06 11:01:58 -07:00
pci-loongson.c PCI: Add Loongson PCI Controller support 2020-05-27 12:52:30 +02:00
pci-mvebu.c PCI: mvebu: mvebu_pcie_map_registers __iomem fix 2019-10-17 11:02:47 +01:00
pci-rcar-gen2.c
pci-tegra.c PCI: tegra: Fix runtime PM imbalance on error 2020-06-01 09:58:59 +01:00
pci-thunder-ecam.c PCI: host-generic: Eliminate pci_host_common_probe wrappers 2020-05-07 09:29:43 +01:00
pci-thunder-pem.c PCI: host-generic: Eliminate pci_host_common_probe wrappers 2020-05-07 09:29:43 +01:00
pci-v3-semi.c Merge branch 'remotes/lorenzo/pci/v3-semi' 2020-06-04 12:59:19 -05:00
pci-versatile.c PCI: of: Add inbound resource parsing to helpers 2019-11-20 16:59:58 +00:00
pci-xgene-msi.c
pci-xgene.c PCI: Constify struct pci_ecam_ops 2020-05-01 16:28:59 +01:00
pcie-altera-msi.c PCI: altera-msi: Allow building as module 2019-05-30 15:34:54 +01:00
pcie-altera.c PCI: altera: Clean up indentation issue on a return statement 2020-05-05 12:40:11 +01:00
pcie-brcmstb.c PCI: brcmstb: Wait for Raspberry Pi's firmware when present 2020-05-13 10:53:23 +01:00
pcie-iproc-bcma.c
pcie-iproc-msi.c PCI: iproc-msi: Fix __iomem annotation in decode_msi_hwirq() 2019-10-17 11:01:24 +01:00
pcie-iproc-platform.c PCI: of: Add inbound resource parsing to helpers 2019-11-20 16:59:58 +00:00
pcie-iproc.c PCI: iproc: Apply quirk_paxc_bridge() for module as well as built-in 2019-12-12 17:21:36 -06:00
pcie-iproc.h PCI: iproc: Reject unconfigured physical functions from PAXC 2018-07-13 11:56:55 +01:00
pcie-mediatek.c PCI: Check for platform_get_irq() failure consistently 2020-05-12 08:14:43 -05:00
pcie-rcar-ep.c PCI: rcar: Add endpoint mode support 2020-05-22 12:35:32 +01:00
pcie-rcar-host.c PCI: rcar: Move shareable code to a common file 2020-05-11 11:29:47 +01:00
pcie-rcar.c PCI: rcar: Fix calculating mask for PCIEPAMR register 2020-05-11 11:29:48 +01:00
pcie-rcar.h PCI: rcar: Add endpoint mode support 2020-05-22 12:35:32 +01:00
pcie-rockchip-ep.c PCI: endpoint: Pass page size as argument to pci_epc_mem_init() 2020-05-11 11:29:48 +01:00
pcie-rockchip-host.c PCI: rockchip: Fix IO outbound ATU register number 2019-12-12 15:25:37 -06:00
pcie-rockchip.c
pcie-rockchip.h Merge branch 'remotes/lorenzo/pci/mmio-dma-ranges' 2019-11-28 08:54:53 -06:00
pcie-tango.c Merge branch 'remotes/lorenzo/pci/host-generic' 2020-06-04 12:59:16 -05:00
pcie-xilinx-nwl.c PCI: of: Add inbound resource parsing to helpers 2019-11-20 16:59:58 +00:00
pcie-xilinx.c PCI: of: Add inbound resource parsing to helpers 2019-11-20 16:59:58 +00:00
vmd.c PCI: vmd: Filter resource type bits from shadow register 2020-05-29 17:05:06 +01:00