linux/drivers/pci
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
..
controller PCI: cadence: Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property 2020-07-27 15:46:02 +01:00
endpoint Merge branch 'remotes/lorenzo/pci/rcar' 2020-06-04 12:59:18 -05:00
hotplug treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
pcie pci-v5.8-changes 2020-06-06 11:01:58 -07:00
switch PCI/switchtec: Correct bool variable type assignment 2020-05-21 15:21:53 -05:00
access.c PCI/AER: Save AER Capability for suspend/resume 2019-10-18 17:05:42 -05:00
ats.c PCI/ATS: Only enable ATS for trusted devices 2020-05-27 14:35:41 +02:00
bus.c PCI: Unexport pci_bus_get() and pci_bus_put() 2019-07-23 18:32:49 -05:00
ecam.c PCI: host-generic: Support building as modules 2020-05-01 16:29:27 +01:00
host-bridge.c
iov.c s390/pci: create links between PFs and VFs 2020-05-20 10:22:51 +02:00
irq.c
Kconfig Merge branch 'pci/trivial' 2019-11-28 08:54:55 -06:00
Makefile PCI: Allow building PCIe things without PCIEPORTBUS 2019-11-21 07:52:33 -06:00
mmap.c PCI: Fix typos and whitespace errors 2019-07-09 07:24:53 -05:00
msi.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
of.c PCI: of: Zero max-link-speed value is invalid 2020-05-18 14:40:38 +01:00
p2pdma.c PCI/P2PDMA: Add AMD Zen Raven and Renoir Root Ports to whitelist 2020-04-23 14:54:51 -05:00
pci-acpi.c PCI: Rename _DSM constants to align with spec 2020-05-27 16:48:21 -05:00
pci-bridge-emul.c PCI: pci-bridge-emul: Eliminate the 'reserved' member 2020-05-22 12:39:35 +01:00
pci-bridge-emul.h PCI: pci-bridge-emul: Fix big-endian support 2019-10-17 12:42:48 +01:00
pci-driver.c PM: sleep: core: Rename dev_pm_smart_suspend_and_suspended() 2020-04-24 21:32:41 +02:00
pci-label.c PCI: Rename _DSM constants to align with spec 2020-05-27 16:48:21 -05:00
pci-mid.c PCI: intel-mid: Convert to new X86 CPU match macros 2020-03-24 21:35:06 +01:00
pci-pf-stub.c PCI: Fix typos and whitespace errors 2019-07-09 07:24:53 -05:00
pci-stub.c PCI: Replace printk(KERN_INFO) with pr_info(), etc 2019-05-09 07:49:54 -05:00
pci-sysfs.c Merge branch 'pci/misc' 2020-04-02 14:26:38 -05:00
pci.c Merge branch 'pci/pm' 2020-06-04 12:59:12 -05:00
pci.h Merge branch 'pci/enumeration' 2020-04-02 14:26:32 -05:00
probe.c pci-v5.8-changes 2020-06-06 11:01:58 -07:00
proc.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
quirks.c pci-v5.8-changes 2020-06-06 11:01:58 -07:00
remove.c PCI: Fix pci_host_bridge struct device release/free handling 2020-05-14 16:36:35 -05:00
rom.c PCI: Use ioremap(), not phys_to_virt() for platform ROM 2020-03-30 09:52:23 -05:00
search.c Merge branch 'pci/host-vmd' 2020-01-29 17:00:02 -06:00
setup-bus.c Merge branch 'remotes/lorenzo/pci/host-generic' 2020-06-04 12:59:16 -05:00
setup-irq.c
setup-res.c PCI: Allow pci_resize_resource() for devices on root bus 2020-05-01 12:28:35 -05:00
slot.c PCI: Add pci_speed_string() 2020-03-10 14:05:33 -05:00
syscall.c PCI: Lock down BAR access when the kernel is locked down 2019-08-19 21:54:15 -07:00
vc.c Merge branch 'pci/trivial' 2019-09-23 16:10:31 -05:00
vpd.c PCI/VPD: Prevent VPD access for Amazon's Annapurna Labs Root Port 2019-09-16 14:10:09 +01:00
xen-pcifront.c xen/pci: Get rid of verbose_request and use dev_dbg() instead 2020-05-29 10:44:59 -05:00