summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorLucas Stach <dev@lynxeye.de>2015-04-29 21:59:47 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-05-01 08:37:19 +0200
commitcbc24926213be28321fc129bdb8226d1588a3918 (patch)
tree8cf8ee697574d0f048f996e7a75db31dd726ddea /drivers/pci/pci.c
parent2a8bc957a7e211731b35fc9c96cc9e46558424ba (diff)
downloadbarebox-cbc24926213be28321fc129bdb8226d1588a3918.tar.gz
barebox-cbc24926213be28321fc129bdb8226d1588a3918.tar.xz
PCI: fill in bus primary field
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@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 470ea664e..3a0e7a5f4 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;