diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2014-10-01 14:31:23 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-10-01 14:31:23 -0400 |
commit | 07a7cbd3b815ea77b44d4d5bb4260b37d03a358d (patch) | |
tree | 7b205e495fff1e1548cac893264cfdfe18ac34dd /drivers/pci/probe.c | |
parent | cc0cb67adb97793e76bf6f1f6e05694f6311cebd (diff) | |
parent | d1e6dc91b532d3d3dbbd0fa356b775ca320dc2c2 (diff) |
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.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index c99c4d65461b..efa48dc0de3b 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -486,7 +486,7 @@ void pci_read_bridge_bases(struct pci_bus *child) | |||
486 | } | 486 | } |
487 | } | 487 | } |
488 | 488 | ||
489 | static struct pci_bus *pci_alloc_bus(void) | 489 | static struct pci_bus *pci_alloc_bus(struct pci_bus *parent) |
490 | { | 490 | { |
491 | struct pci_bus *b; | 491 | struct pci_bus *b; |
492 | 492 | ||
@@ -501,6 +501,10 @@ static struct pci_bus *pci_alloc_bus(void) | |||
501 | INIT_LIST_HEAD(&b->resources); | 501 | INIT_LIST_HEAD(&b->resources); |
502 | b->max_bus_speed = PCI_SPEED_UNKNOWN; | 502 | b->max_bus_speed = PCI_SPEED_UNKNOWN; |
503 | b->cur_bus_speed = PCI_SPEED_UNKNOWN; | 503 | b->cur_bus_speed = PCI_SPEED_UNKNOWN; |
504 | #ifdef CONFIG_PCI_DOMAINS_GENERIC | ||
505 | if (parent) | ||
506 | b->domain_nr = parent->domain_nr; | ||
507 | #endif | ||
504 | return b; | 508 | return b; |
505 | } | 509 | } |
506 | 510 | ||
@@ -672,7 +676,7 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, | |||
672 | /* | 676 | /* |
673 | * Allocate a new bus, and inherit stuff from the parent.. | 677 | * Allocate a new bus, and inherit stuff from the parent.. |
674 | */ | 678 | */ |
675 | child = pci_alloc_bus(); | 679 | child = pci_alloc_bus(parent); |
676 | if (!child) | 680 | if (!child) |
677 | return NULL; | 681 | return NULL; |
678 | 682 | ||
@@ -1913,13 +1917,14 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, | |||
1913 | char bus_addr[64]; | 1917 | char bus_addr[64]; |
1914 | char *fmt; | 1918 | char *fmt; |
1915 | 1919 | ||
1916 | b = pci_alloc_bus(); | 1920 | b = pci_alloc_bus(NULL); |
1917 | if (!b) | 1921 | if (!b) |
1918 | return NULL; | 1922 | return NULL; |
1919 | 1923 | ||
1920 | b->sysdata = sysdata; | 1924 | b->sysdata = sysdata; |
1921 | b->ops = ops; | 1925 | b->ops = ops; |
1922 | b->number = b->busn_res.start = bus; | 1926 | b->number = b->busn_res.start = bus; |
1927 | pci_bus_assign_domain_nr(b, parent); | ||
1923 | b2 = pci_find_bus(pci_domain_nr(b), bus); | 1928 | b2 = pci_find_bus(pci_domain_nr(b), bus); |
1924 | if (b2) { | 1929 | if (b2) { |
1925 | /* If we already got to this bus through a different bridge, ignore it */ | 1930 | /* If we already got to this bus through a different bridge, ignore it */ |