summaryrefslogtreecommitdiff
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2014-10-01 18:31:23 (GMT)
committerBjorn Helgaas <bhelgaas@google.com>2014-10-01 18:31:23 (GMT)
commit07a7cbd3b815ea77b44d4d5bb4260b37d03a358d (patch)
tree7b205e495fff1e1548cac893264cfdfe18ac34dd /drivers/pci/probe.c
parentcc0cb67adb97793e76bf6f1f6e05694f6311cebd (diff)
parentd1e6dc91b532d3d3dbbd0fa356b775ca320dc2c2 (diff)
downloadlinux-07a7cbd3b815ea77b44d4d5bb4260b37d03a358d.tar.xz
Merge branch 'pci/host-generic' into next
* pci/host-generic: arm64: Add architectural support for PCI PCI: Add pci_remap_iospace() to map bus I/O resources of/pci: Add support for parsing PCI host bridge resources from DT of/pci: Add pci_get_new_domain_nr() and of_get_pci_domain_nr() PCI: Add generic domain handling of/pci: Fix the conversion of IO ranges into IO resources of/pci: Move of_pci_range_to_resource() to of/address.c ARM: Define PCI_IOBASE as the base of virtual PCI IO space of/pci: Add pci_register_io_range() and pci_pio_to_address() asm-generic/io.h: Fix ioport_map() for !CONFIG_GENERIC_IOMAP Conflicts: drivers/pci/host/pci-tegra.c
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index c99c4d6..efa48dc 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -486,7 +486,7 @@ void pci_read_bridge_bases(struct pci_bus *child)
}
}
-static struct pci_bus *pci_alloc_bus(void)
+static struct pci_bus *pci_alloc_bus(struct pci_bus *parent)
{
struct pci_bus *b;
@@ -501,6 +501,10 @@ static struct pci_bus *pci_alloc_bus(void)
INIT_LIST_HEAD(&b->resources);
b->max_bus_speed = PCI_SPEED_UNKNOWN;
b->cur_bus_speed = PCI_SPEED_UNKNOWN;
+#ifdef CONFIG_PCI_DOMAINS_GENERIC
+ if (parent)
+ b->domain_nr = parent->domain_nr;
+#endif
return b;
}
@@ -672,7 +676,7 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent,
/*
* Allocate a new bus, and inherit stuff from the parent..
*/
- child = pci_alloc_bus();
+ child = pci_alloc_bus(parent);
if (!child)
return NULL;
@@ -1913,13 +1917,14 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
char bus_addr[64];
char *fmt;
- b = pci_alloc_bus();
+ b = pci_alloc_bus(NULL);
if (!b)
return NULL;
b->sysdata = sysdata;
b->ops = ops;
b->number = b->busn_res.start = bus;
+ pci_bus_assign_domain_nr(b, parent);
b2 = pci_find_bus(pci_domain_nr(b), bus);
if (b2) {
/* If we already got to this bus through a different bridge, ignore it */