aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/pci-common.c')
-rw-r--r--arch/powerpc/kernel/pci-common.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index b6d4767e4e27..1037b3a093ee 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -776,6 +776,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
776 776
777static void __devinit __pcibios_fixup_bus(struct pci_bus *bus) 777static void __devinit __pcibios_fixup_bus(struct pci_bus *bus)
778{ 778{
779 struct pci_controller *hose = pci_bus_to_host(bus);
779 struct pci_dev *dev = bus->self; 780 struct pci_dev *dev = bus->self;
780 781
781 pr_debug("PCI: Fixup bus %d (%s)\n", bus->number, dev ? pci_name(dev) : "PHB"); 782 pr_debug("PCI: Fixup bus %d (%s)\n", bus->number, dev ? pci_name(dev) : "PHB");
@@ -793,6 +794,27 @@ static void __devinit __pcibios_fixup_bus(struct pci_bus *bus)
793 if (!res->flags || bus->self->transparent) 794 if (!res->flags || bus->self->transparent)
794 continue; 795 continue;
795 796
797 /* On PowerMac, Apple leaves bridge windows open over
798 * an inaccessible region of memory space (0...fffff)
799 * which is somewhat bogus, but that's what they think
800 * means disabled...
801 *
802 * We clear those to force them to be reallocated later
803 *
804 * We detect such regions by the fact that the base is
805 * equal to the pci_mem_offset of the host bridge and
806 * their size is smaller than 1M.
807 */
808 if (res->start == hose->pci_mem_offset &&
809 res->end < 0x100000) {
810 printk(KERN_INFO
811 "PCI: Closing bogus Apple Firmware"
812 " region %d on bus 0x%02x\n",
813 i, bus->number);
814 res->flags = 0;
815 continue;
816 }
817
796 pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n", 818 pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
797 pci_name(dev), i, 819 pci_name(dev), i,
798 (unsigned long long)res->start,\ 820 (unsigned long long)res->start,\