PCI: tegra: Add Tegra194 MCFG quirks for ECAM errata
authorVidya Sagar <vidyas@nvidia.com>
Fri, 16 Apr 2021 13:45:37 +0000 (19:15 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 16 Apr 2021 16:34:17 +0000 (11:34 -0500)
commit7f100744749e4fe547dece3bb6557fae5f0a7252
tree6d85f4a538f388d772f9a715b84434b8ca9e43dc
parenta38fd8748464831584a19438cbb3082b5a2dab15
PCI: tegra: Add Tegra194 MCFG quirks for ECAM errata

The PCIe controller in Tegra194 SoC is not ECAM-compliant.  With the
current hardware design, ECAM can be enabled only for one controller (the
C5 controller) with bus numbers starting from 160 instead of 0. A different
approach is taken to avoid this abnormal way of enabling ECAM for just one
controller but to enable configuration space access for all the other
controllers. In this approach, ops are added through MCFG quirk mechanism
which access the configuration spaces by dynamically programming iATU
(internal AddressTranslation Unit) to generate respective configuration
accesses just like the way it is done in DesignWare core sub-system.

This issue is specific to Tegra194 and it would be fixed in the future
generations of Tegra SoCs.

Link: https://lore.kernel.org/r/20210416134537.19474-1-vidyas@nvidia.com
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/acpi/pci_mcfg.c
drivers/pci/controller/dwc/Makefile
drivers/pci/controller/dwc/pcie-tegra194.c
include/linux/pci-ecam.h