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)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 7 May 2020 08:34:37 +0000 (09:34 +0100)
commit2b9f217433e31d125fb697ca7974d3de3ecc3e92
treef8a59b000bc2893b961acb42d169e2aefc974aae
parent8f3d9f354286745c751374f5f1fcafee6b3f3136
PCI: rcar: Fix incorrect programming of OB windows

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>
drivers/pci/controller/pcie-rcar.c