PCI: rcar: Fix incorrect programming of OB windows
authorAndrew Murray <andrew.murray@arm.com>
Fri, 4 Oct 2019 13:29:41 +0000 (14:29 +0100)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:38:24 +0000 (15:38 -0400)
commitf84bd31331ffffcd5d764ac97bf3f7ba631321e5
treed9827735d481eee3aa41b4e74aac3fc9c0823f03
parentfe5135063a8664ffdda1be38fa4c74b2b7077a16
PCI: rcar: Fix incorrect programming of OB windows

[ Upstream commit 2b9f217433e31d125fb697ca7974d3de3ecc3e92 ]

The outbound windows (PCIEPAUR(x), PCIEPALR(x)) describe a mapping between
a CPU address (which is determined by the window number 'x') and a
programmed PCI address - Thus allowing the controller to translate CPU
accesses into PCI accesses.

However the existing code incorrectly writes the CPU address - lets fix
this by writing the PCI address instead.

For memory transactions, existing DT users describe a 1:1 identity mapping
and thus this change should have no effect. However the same isn't true for
I/O.

Link: https://lore.kernel.org/r/20191004132941.6660-1-andrew.murray@arm.com
Fixes: c25da4778803 ("PCI: rcar: Add Renesas R-Car PCIe driver")
Tested-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/host/pcie-rcar.c