PCI: iproc: Fix up corrupted PAXC root complex config registers
authorRay Jui <ray.jui@broadcom.com>
Tue, 12 Jun 2018 00:21:04 +0000 (17:21 -0700)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 13 Jul 2018 10:43:49 +0000 (11:43 +0100)
commit3bc70825e4361eaedffeb4e85e1b2774547e66a0
tree4ff1aa99fe80012477495427e5bd1568859edb02
parentb95e2cd021938d2c3455fd2fce69b4845de0b85f
PCI: iproc: Fix up corrupted PAXC root complex config registers

On certain versions of Broadcom PAXC based root complexes, certain
regions of the configuration space are corrupted. As a result, it
prevents the Linux PCIe stack from traversing the linked list of the
capability registers completely and therefore the root complex is
not advertised as "PCIe capable". This prevents the correct PCIe RID
from being parsed in the kernel PCIe stack. A correct RID is required
for mapping to a stream ID from the SMMU or the device ID from the
GICv3 ITS.

This patch fixes up the issue by manually populating the related
PCIe capabilities.

Signed-off-by: Ray Jui <rjui@broadcom.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Oza Pawandeep <poza@codeaurora.org>
drivers/pci/controller/pcie-iproc.c
drivers/pci/controller/pcie-iproc.h