diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-08-18 20:23:24 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-08-18 20:23:24 -0400 |
commit | a59f2bbaedc5de5a69db5d9c914462173ef3ffa6 (patch) | |
tree | 89b86c5fa7455a108fc9ff2200dba1c6c9dd8232 /drivers | |
parent | 056c58e8eb4d6765214757e541b68095e2eb2bd2 (diff) | |
parent | ce6754235b423610e91f5300e1555c2e4ee1c03a (diff) |
Merge branch 'x86-merge' into for-linus
Diffstat (limited to 'drivers')
-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) | |||
383 | res->start = base; | 383 | res->start = base; |
384 | if (!res->end) | 384 | if (!res->end) |
385 | res->end = limit + 0xfff; | 385 | res->end = limit + 0xfff; |
386 | printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n", pci_name(dev), res->start, res->end); | ||
386 | } | 387 | } |
387 | 388 | ||
388 | res = child->resource[1]; | 389 | res = child->resource[1]; |
@@ -394,6 +395,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
394 | res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM; | 395 | res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM; |
395 | res->start = base; | 396 | res->start = base; |
396 | res->end = limit + 0xfffff; | 397 | res->end = limit + 0xfffff; |
398 | printk(KERN_INFO "PCI: bridge %s 32bit mmio: [%llx, %llx]\n", pci_name(dev), res->start, res->end); | ||
397 | } | 399 | } |
398 | 400 | ||
399 | res = child->resource[2]; | 401 | res = child->resource[2]; |
@@ -429,6 +431,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
429 | res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH; | 431 | res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH; |
430 | res->start = base; | 432 | res->start = base; |
431 | res->end = limit + 0xfffff; | 433 | res->end = limit + 0xfffff; |
434 | 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); | ||
432 | } | 435 | } |
433 | } | 436 | } |
434 | 437 | ||
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) | |||
530 | } | 530 | } |
531 | EXPORT_SYMBOL(pci_bus_assign_resources); | 531 | EXPORT_SYMBOL(pci_bus_assign_resources); |
532 | 532 | ||
533 | static void pci_bus_dump_res(struct pci_bus *bus) | ||
534 | { | ||
535 | int i; | ||
536 | |||
537 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { | ||
538 | struct resource *res = bus->resource[i]; | ||
539 | if (!res) | ||
540 | continue; | ||
541 | |||
542 | 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); | ||
543 | } | ||
544 | } | ||
545 | |||
546 | static void pci_bus_dump_resources(struct pci_bus *bus) | ||
547 | { | ||
548 | struct pci_bus *b; | ||
549 | struct pci_dev *dev; | ||
550 | |||
551 | |||
552 | pci_bus_dump_res(bus); | ||
553 | |||
554 | list_for_each_entry(dev, &bus->devices, bus_list) { | ||
555 | b = dev->subordinate; | ||
556 | if (!b) | ||
557 | continue; | ||
558 | |||
559 | pci_bus_dump_resources(b); | ||
560 | } | ||
561 | } | ||
562 | |||
533 | void __init | 563 | void __init |
534 | pci_assign_unassigned_resources(void) | 564 | pci_assign_unassigned_resources(void) |
535 | { | 565 | { |
@@ -545,4 +575,9 @@ pci_assign_unassigned_resources(void) | |||
545 | pci_bus_assign_resources(bus); | 575 | pci_bus_assign_resources(bus); |
546 | pci_enable_bridges(bus); | 576 | pci_enable_bridges(bus); |
547 | } | 577 | } |
578 | |||
579 | /* dump the resource on buses */ | ||
580 | list_for_each_entry(bus, &pci_root_buses, node) { | ||
581 | pci_bus_dump_resources(bus); | ||
582 | } | ||
548 | } | 583 | } |