PCI: iproc: Add CRS check in config read
authorSrinath Mannam <srinath.mannam@broadcom.com>
Fri, 1 Mar 2019 04:52:15 +0000 (10:22 +0530)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 3 Apr 2019 10:52:38 +0000 (11:52 +0100)
commit73b9e4d3309c540d9c855322e6ccedfa8ef698fc
tree64f6ef3084645e7f79904df787f1597068f13b7c
parent9e98c678c2d6ae3a17cb2de55d17f69dddaa231b
PCI: iproc: Add CRS check in config read

The IPROC PCIe host controller implementation returns CFG_RETRY_STATUS
(0xffff0001) data when it receives a CRS completion, regardless of the
address of the read or the CRS Software Visibility Enable bit. As a
workaround the driver retries in software any read that returns
CFG_RETRY_STATUS even though, for reads of registers that are not Vendor
ID, the register value can correspond to CFG_RETRY_STATUS; this
situation would cause a timeout and failure of reading a valid register
value.

IPROC PCIe host controller PAXB v2 has a register to show config read
status flags like SC, UR, CRS and CA. Using this status flag,
an extra check is added to confirm the CRS using status flags before
reissuing a config read, fixing the issue.

Signed-off-by: Srinath Mannam <srinath.mannam@broadcom.com>
[lorenzo.pieralisi@arm.com: rewrote commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Scott Branden <scott.branden@broadcom.com>
drivers/pci/controller/pcie-iproc.c