diff options
author | Thierry Reding <treding@nvidia.com> | 2014-11-27 11:54:09 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-12-02 02:55:43 +0300 |
commit | 5106787a9e08dc2901d6b2513ed8f377671befa8 (patch) | |
tree | 0e41d4b0ad8d4291f72924add8c7eac3cf472d83 /lib/dec_and_lock.c | |
parent | 7fc986d8a9727e5d40da3c2c1c343da6142e82a9 (diff) | |
download | linux-5106787a9e08dc2901d6b2513ed8f377671befa8.tar.xz |
PCI: tegra: Use physical range for I/O mapping
Commit 0b0b0893d49b ("of/pci: Fix the conversion of IO ranges into IO
resources") changed how I/O resources are parsed from DT. Rather than
containing the physical address of the I/O region, the addresses will now
be in I/O address space.
On Tegra the union of all ranges is used to expose a top-level memory-
mapped resource for the PCI host bridge. This helps to make /proc/iomem
more readable.
Combining both of the above, the union would now include the I/O space
region. This causes a regression on Tegra20, where the physical base
address of the PCIe controller (and therefore of the union) is located at
physical address 0x80000000. Since I/O space starts at 0, the union will
now include all of system RAM which starts at 0x00000000.
This commit fixes this by keeping two copies of the I/O range: one that
represents the range in the CPU's physical address space, the other for the
range in the I/O address space. This allows the translation setup within
the driver to reuse the physical addresses. The code registering the I/O
region with the PCI core uses both ranges to establish the mapping.
Fixes: 0b0b0893d49b ("of/pci: Fix the conversion of IO ranges into IO resources")
Reported-by: Marc Zyngier <marc.zyngier@arm.com>
Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'lib/dec_and_lock.c')
0 files changed, 0 insertions, 0 deletions