linux/drivers/pci
Niklas Cassel b6900aeb19 PCI: dwc: Make cpu_addr_fixup take struct dw_pcie as argument
The current cpu addr fixup mask for ARTPEC-6, GENMASK(27, 0), is wrong.
The correct cpu addr fixup mask for ARTPEC-6 is GENMASK(28, 0).

However, having a hardcoded cpu addr fixup mask in each driver is
arguably wrong.
A device tree property called something like "cpu-addr-fixup-mask"
would have been a better solution.
Introducing such a property is not needed though, since we already have
pp->cfg0_base and ep->phys_base, which is derived from already existing
device tree properties.

It is also worth noting that for ARTPEC-7, hardcoding the cpu addr fixup
mask is not possible, since it uses a High Address Bits Look Up Table,
which means that it can, at runtime, map the PCIe window to an arbitrary
address in the 32-bit address space.

By using pp->cfg0_base and ep->phys_base, we avoid hardcoding a mask
in each driver. This should work for ARTPEC-6, DRA7xx, and ARTPEC-7.
I have not changed the code in DRA7xx though, since their existing
code works, but if they want, they could use the same logic as
artpec6_pcie_cpu_addr_fixup, and thus remove their hardcoded mask.

The reason why the fixup mask is needed is explained in commit f4c55c5a3f
("PCI: designware: Program ATU with untranslated address").

Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
2017-12-21 11:10:34 +00:00
..
dwc PCI: dwc: Make cpu_addr_fixup take struct dw_pcie as argument 2017-12-21 11:10:34 +00:00
endpoint PCI: endpoint: make config_item_type const 2017-10-19 16:15:25 +02:00
host PCI: rcar: Fix use-after-free in probe error path 2017-12-12 11:01:47 -06:00
hotplug pci-v4.15-changes 2017-11-15 15:01:28 -08:00
pcie pci-v4.15-changes 2017-11-15 15:01:28 -08:00
switch Support for the switchtec ntb and related changes. Also, a couple of 2017-11-19 20:41:53 -10:00
Kconfig Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-26 14:11:54 -08:00
Makefile Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-26 14:11:54 -08:00
access.c PCI: Provide Kconfig option for lockless config space accessors 2017-06-28 22:32:56 +02:00
ats.c PCI: Restore PRI and PASID state after Function-Level Reset 2017-05-30 15:40:50 -05:00
bus.c PCI: Autosense device removal in pci_bridge_d3_update() 2016-11-17 18:44:56 -06:00
ecam.c PCI: ECAM: Map config region with pci_remap_cfgspace() 2017-04-24 13:53:14 -05:00
host-bridge.c cxl: use pcibios_free_controller_deferred() when removing vPHBs 2016-08-22 11:09:33 +10:00
iov.c PCI: Restore ARI Capable Hierarchy before setting numVFs 2017-10-10 19:15:29 -05:00
irq.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmap.c PCI: Add I/O BAR support to generic pci_mmap_resource_range() 2017-04-20 08:47:47 -05:00
msi.c PCI/MSI: Set MSI_FLAG_MUST_REACTIVATE in core code 2017-10-18 15:38:31 +02:00
of.c PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing 2015-10-16 13:07:14 +01:00
pci-acpi.c ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle 2017-10-05 15:48:54 -05:00
pci-driver.c PM / sleep: Avoid excess pm_runtime_enable() calls in device_resume() 2017-12-11 14:32:56 +01:00
pci-label.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci-mid.c PCI / PM: Simplify device wakeup settings code 2017-06-28 01:52:45 +02:00
pci-stub.c
pci-sysfs.c pci-v4.15-changes 2017-11-15 15:01:28 -08:00
pci.c pci-v4.15-changes 2017-11-15 15:01:28 -08:00
pci.h pci-v4.15-changes 2017-11-15 15:01:28 -08:00
probe.c PCI: Distribute available buses to hotplug-capable bridges 2017-11-06 18:48:59 -06:00
proc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
quirks.c pci-v4.15-changes 2017-11-15 15:01:28 -08:00
remove.c PCI: Detach driver before procfs & sysfs teardown on device remove 2017-10-25 08:47:10 -05:00
rom.c PCI: Fail pci_map_rom() if the option ROM is invalid 2017-11-08 14:47:07 -06:00
search.c PCI: Add device flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT 2017-04-13 18:49:50 -05:00
setup-bus.c Merge branch 'pci/resource' into next 2017-11-14 12:11:25 -06:00
setup-irq.c PCI: Inline and remove pcibios_update_irq() 2017-08-10 12:49:57 -05:00
setup-res.c pci-v4.15-changes 2017-11-15 15:01:28 -08:00
slot.c locking/atomic, kref: Add kref_read() 2017-01-14 11:37:18 +01:00
syscall.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vc.c PCI: Fix unaligned accesses in VC code 2016-06-20 13:24:20 -05:00
vpd.c
xen-pcifront.c xen: make use of xenbus_read_unsigned() in xen-pcifront 2016-11-07 13:55:26 +01:00