Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e64a2a97 authored by Ben Dooks's avatar Ben Dooks Committed by Bjorn Helgaas
Browse files

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: default avatarBen Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent 80a595d9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;