diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2011-10-28 18:25:40 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-01-06 15:10:51 -0500 |
commit | a9d9f5276cb3fa08351e8837ab9398bfd8e69a2e (patch) | |
tree | c23406ab8668e176bcb0bdf15d201ce3afc4613b /drivers/pci/probe.c | |
parent | 45ca9e9730c5acdb482dd95799fd8ac834481897 (diff) |
PCI: show host bridges and root bus resources
Show the bus number and resources for every root bus we create. This
will become more interesting when we supply the correct resources
instead of using the defaults (ioport_resource and iomem_resource).
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index d5d0ab810f79..2f0b14451d9d 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -1525,9 +1525,10 @@ unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus) | |||
1525 | struct pci_bus * pci_create_bus(struct device *parent, | 1525 | struct pci_bus * pci_create_bus(struct device *parent, |
1526 | int bus, struct pci_ops *ops, void *sysdata) | 1526 | int bus, struct pci_ops *ops, void *sysdata) |
1527 | { | 1527 | { |
1528 | int error; | 1528 | int error, i; |
1529 | struct pci_bus *b, *b2; | 1529 | struct pci_bus *b, *b2; |
1530 | struct device *dev; | 1530 | struct device *dev; |
1531 | struct resource *res; | ||
1531 | 1532 | ||
1532 | b = pci_alloc_bus(); | 1533 | b = pci_alloc_bus(); |
1533 | if (!b) | 1534 | if (!b) |
@@ -1580,6 +1581,16 @@ struct pci_bus * pci_create_bus(struct device *parent, | |||
1580 | b->resource[0] = &ioport_resource; | 1581 | b->resource[0] = &ioport_resource; |
1581 | b->resource[1] = &iomem_resource; | 1582 | b->resource[1] = &iomem_resource; |
1582 | 1583 | ||
1584 | if (parent) | ||
1585 | dev_info(parent, "PCI host bridge to bus %s\n", dev_name(&b->dev)); | ||
1586 | else | ||
1587 | printk(KERN_INFO "PCI host bridge to bus %s\n", dev_name(&b->dev)); | ||
1588 | |||
1589 | pci_bus_for_each_resource(b, res, i) { | ||
1590 | if (res) | ||
1591 | dev_info(&b->dev, "root bus resource %pR\n", res); | ||
1592 | } | ||
1593 | |||
1583 | return b; | 1594 | return b; |
1584 | 1595 | ||
1585 | class_dev_reg_err: | 1596 | class_dev_reg_err: |