summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2014-02-18 11:11:11 +0900
committerBjorn Helgaas <bhelgaas@google.com>2014-02-18 13:19:59 -0700
commite64a2a973e179613489a0ddb1bb550dff108164e (patch)
tree5c954dab4c948da5d24950eb81aeabe63763ab60 /drivers/pci
parent80a595d941a2ce2953e6c77d822d8a4c3d8fa5a0 (diff)
downloadblackbird-op-linux-e64a2a973e179613489a0ddb1bb550dff108164e.tar.gz
blackbird-op-linux-e64a2a973e179613489a0ddb1bb550dff108164e.zip
PCI: rcar: Fix bridge logic configuration accesses
The bridge logic at slot 0 only supports reads up to 0x40 and the rest of the PCI configuration space for this slot is marked as reserved in the manual. Trying a read from offset 0x100 is producing an error from the bridge. With error interrupts enabled, the following is printed: pci-rcar-gen2 ee0d0000.pci: error irq: status 00000014 Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/host/pci-rcar-gen2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
index 11e444e79f45..6288476576a7 100644
--- a/drivers/pci/host/pci-rcar-gen2.c
+++ b/drivers/pci/host/pci-rcar-gen2.c
@@ -119,6 +119,10 @@ static void __iomem *rcar_pci_cfg_base(struct pci_bus *bus, unsigned int devfn,
if (slot > 2)
return NULL;
+ /* bridge logic only has registers to 0x40 */
+ if (slot == 0x0 && where >= 0x40)
+ return NULL;
+
val = slot ? RCAR_AHBPCI_WIN1_DEVICE | RCAR_AHBPCI_WIN_CTR_CFG :
RCAR_AHBPCI_WIN1_HOST | RCAR_AHBPCI_WIN_CTR_CFG;
OpenPOWER on IntegriCloud