diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-08-18 09:54:13 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-08-18 09:54:13 -0700 |
commit | ce6754235b423610e91f5300e1555c2e4ee1c03a (patch) | |
tree | 75233676c8145a4974dee0ec71a9bba2df33a704 /drivers/pci | |
parent | 89499759dc0dd300528510f465b0bf532fc79a2a (diff) | |
parent | a83fe32fa668c0a17b3f99a1480b006f7d649924 (diff) | |
download | linux-ce6754235b423610e91f5300e1555c2e4ee1c03a.tar.gz linux-ce6754235b423610e91f5300e1555c2e4ee1c03a.tar.bz2 linux-ce6754235b423610e91f5300e1555c2e4ee1c03a.zip |
Merge branch 'pci-for-jesse' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip into x86-merge
Conflicts:
drivers/pci/probe.c
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/probe.c | 3 | ||||
-rw-r--r-- | drivers/pci/setup-bus.c | 35 |
2 files changed, 38 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index a04498d390c8..cce2f4cb1fbf 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -383,6 +383,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) res->start = base; if (!res->end) res->end = limit + 0xfff; + printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n", pci_name(dev), res->start, res->end); } res = child->resource[1]; @@ -394,6 +395,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM; res->start = base; res->end = limit + 0xfffff; + printk(KERN_INFO "PCI: bridge %s 32bit mmio: [%llx, %llx]\n", pci_name(dev), res->start, res->end); } res = child->resource[2]; @@ -429,6 +431,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH; res->start = base; res->end = limit + 0xfffff; + printk(KERN_INFO "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n", pci_name(dev), (res->flags & PCI_PREF_RANGE_TYPE_64)?"64":"32",res->start, res->end); } } diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 827c0a520e2b..82634a2f1b1d 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -530,6 +530,36 @@ void __ref pci_bus_assign_resources(struct pci_bus *bus) } EXPORT_SYMBOL(pci_bus_assign_resources); +static void pci_bus_dump_res(struct pci_bus *bus) +{ + int i; + + for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { + struct resource *res = bus->resource[i]; + if (!res) + continue; + + printk(KERN_INFO "bus: %02x index %x %s: [%llx, %llx]\n", bus->number, i, (res->flags & IORESOURCE_IO)? "io port":"mmio", res->start, res->end); + } +} + +static void pci_bus_dump_resources(struct pci_bus *bus) +{ + struct pci_bus *b; + struct pci_dev *dev; + + + pci_bus_dump_res(bus); + + list_for_each_entry(dev, &bus->devices, bus_list) { + b = dev->subordinate; + if (!b) + continue; + + pci_bus_dump_resources(b); + } +} + void __init pci_assign_unassigned_resources(void) { @@ -545,4 +575,9 @@ pci_assign_unassigned_resources(void) pci_bus_assign_resources(bus); pci_enable_bridges(bus); } + + /* dump the resource on buses */ + list_for_each_entry(bus, &pci_root_buses, node) { + pci_bus_dump_resources(bus); + } } |