PCI: iproc: Invalidate PAXB address mapping before programming it
authorAbhishek Shah <abhishek.shah@broadcom.com>
Fri, 6 Sep 2019 03:58:13 +0000 (09:28 +0530)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 25 Oct 2019 09:18:00 +0000 (10:18 +0100)
commit9415743e4c8a029bfa46654e3a0a681a8db473f8
tree402208cffee2efe343dcdb5ae50b60d70dcd78bf
parent54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c
PCI: iproc: Invalidate PAXB address mapping before programming it

Invalidate PAXB inbound/outbound address mapping on probe before
programming it.

Kernel relies on outbound/inbound windows VALID bit in OARR registers to
detect if a window was programmed and if it is set it does not overwrite
it.

This causes issues on soft reboot (eg kexec) since the host controller
does not go through a HW reset on softboot so the kernel detects valid
outbound/inbound windows configuration and is not able to reprogramme
it as expected.

Therefore, in order to make sure outbound/inbound windows are
reprogrammed on soft reboot (eg kexec), invalidate memory windows on
each probe to fix the issue.

Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Andrew Murray <andrew.murray@arm.com>
drivers/pci/controller/pcie-iproc.c