[PATCH 2/3] PCI: fill in bus primary field

Lucas Stach dev at lynxeye.de
Wed Apr 29 12:59:47 PDT 2015

This was erroneously left uninitialzed as nothing was using it.
The i.MX6 PCI driver needs this to be filled properly to decide
if a config space access is allowed for a specific devfn.

This fixes PCI enumeration on the Gateworks GW54xx board.

Signed-off-by: Lucas Stach <dev at lynxeye.de>
 drivers/pci/pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 470ea66..3a0e7a5 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -368,6 +368,7 @@ unsigned int pci_scan_bus(struct pci_bus *bus)
 			child_bus->parent = &dev->dev;
 			child_bus->number = bus_index++;
+			child_bus->primary = bus->number;
 			list_add_tail(&child_bus->node, &bus->children);
 			dev->subordinate = child_bus;

More information about the barebox mailing list