pci: rmobile: Filter out device 1 and 2

Only PCI device 1 and 2 is populated on the R-Car Gen2 internal
PCIe controller. Ignore all other devices. This fix prevents a
duplication of OHCI controller response on slot 0 and 1.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
This commit is contained in:
Marek Vasut 2018-08-24 21:03:14 +02:00 committed by Marek Vasut
parent 11ed312896
commit 313360b13f

View File

@ -97,7 +97,7 @@ static int rcar_gen2_pci_addr_valid(pci_dev_t d, uint offset)
/* Only one EHCI/OHCI device built-in */
slot = PCI_DEV(d);
if (slot > 2)
if (slot != 1 && slot != 2)
return -EINVAL;
/* bridge logic only has registers to 0x40 */