1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/pci/controller/dwc
Rob Herring 281f1f99cf PCI: dwc: Detect number of iATU windows
Currently the number of inbound and outbound iATU windows are determined
from DT properties. Unfortunately, there's 'num-viewport' for RC mode
and 'num-ib-windows' and 'num-ob-windows' for EP mode, yet the number of
windows is not mode dependent. Also, 'num-viewport' is not clear whether
that's inbound, outbound or both. We can probably assume it's outbound
windows as that's all RC mode uses.

However, using DT properties isn't really needed as the number of
regions can be detected at runtime by poking the iATU registers. The
basic algorithm is just writing a target address and reading back what
we wrote. In the unrolled ATU case, we have to take care not to go
past the mapped region.

With this, we can drop num_viewport in favor of num_ob_windows instead.

Link: https://lore.kernel.org/r/20201105211159.1814485-17-robh@kernel.org
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org
2020-11-19 10:51:41 +00:00
..
Kconfig PCI: meson: Build as module by default 2020-10-05 13:01:42 +01:00
Makefile PCI: uniphier: Add Socionext UniPhier Pro5 PCIe endpoint controller driver 2020-06-04 10:03:18 +01:00
pci-dra7xx.c PCI: dwc: Move dw_pcie_setup_rc() to DWC common code 2020-11-19 10:51:41 +00:00
pci-exynos.c PCI: dwc: Move dw_pcie_setup_rc() to DWC common code 2020-11-19 10:51:41 +00:00
pci-imx6.c PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() 2020-11-19 10:51:41 +00:00
pci-keystone.c Revert "PCI: dwc/keystone: Drop duplicated 'num-viewport'" 2020-11-19 10:51:41 +00:00
pci-layerscape-ep.c PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code 2020-11-19 10:51:40 +00:00
pci-layerscape.c PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() 2020-11-19 10:51:41 +00:00
pci-meson.c PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() 2020-11-19 10:51:41 +00:00
pcie-al.c PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() 2020-11-19 10:51:41 +00:00
pcie-armada8k.c PCI: dwc: Move dw_pcie_setup_rc() to DWC common code 2020-11-19 10:51:41 +00:00
pcie-artpec6.c PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() 2020-11-19 10:51:41 +00:00
pcie-designware-ep.c PCI: dwc: Detect number of iATU windows 2020-11-19 10:51:41 +00:00
pcie-designware-host.c PCI: dwc: Detect number of iATU windows 2020-11-19 10:51:41 +00:00
pcie-designware-plat.c PCI: dwc: Move dw_pcie_setup_rc() to DWC common code 2020-11-19 10:51:41 +00:00
pcie-designware.c PCI: dwc: Detect number of iATU windows 2020-11-19 10:51:41 +00:00
pcie-designware.h PCI: dwc: Detect number of iATU windows 2020-11-19 10:51:41 +00:00
pcie-hisi.c PCI: dwc: hisi: Remove non-ECAM HiSilicon hip05/hip06 driver 2020-07-27 17:06:32 +01:00
pcie-histb.c PCI: dwc: Move dw_pcie_setup_rc() to DWC common code 2020-11-19 10:51:41 +00:00
pcie-intel-gw.c PCI: dwc: Detect number of iATU windows 2020-11-19 10:51:41 +00:00
pcie-kirin.c PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() 2020-11-19 10:51:41 +00:00
pcie-qcom.c PCI: dwc: Move dw_pcie_setup_rc() to DWC common code 2020-11-19 10:51:41 +00:00
pcie-spear13xx.c PCI: dwc: Move dw_pcie_setup_rc() to DWC common code 2020-11-19 10:51:41 +00:00
pcie-tegra194.c PCI: dwc: Detect number of iATU windows 2020-11-19 10:51:41 +00:00
pcie-uniphier-ep.c PCI: dwc: Move "dbi", "dbi2", and "addr_space" resource setup into common code 2020-11-19 10:51:40 +00:00
pcie-uniphier.c PCI: dwc: Remove unnecessary wrappers around dw_pcie_host_init() 2020-11-19 10:51:41 +00:00