]> git.hungrycats.org Git - linux/commitdiff
ppc32: Fix PCI<->OF linkage for G5s AGP bus
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 6 Feb 2004 03:15:35 +0000 (14:15 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 6 Feb 2004 03:15:35 +0000 (14:15 +1100)
arch/ppc/kernel/pci.c

index 6ded5edaab9f8db6429cc98b351c42480ec736d9..bb1a29201330646793dbebd250a52c9c71135f4f 100644 (file)
@@ -800,6 +800,17 @@ pci_busdev_to_OF_node(struct pci_bus *bus, int devfn)
                return NULL;
 
        /* Fixup bus number according to what OF think it is. */
+#ifdef CONFIG_PPC_PMAC
+       /* The G5 need a special case here. Basically, we don't remap all
+        * busses on it so we don't create the pci-OF-map. However, we do
+        * remap the AGP bus and so have to deal with it. A future better
+        * fix has to be done by making the remapping per-host and always
+        * filling the pci_to_OF map. --BenH
+        */
+       if (_machine == _MACH_Pmac && busnr >= 0xf0)
+               busnr -= 0xf0;
+       else
+#endif
        if (pci_to_OF_bus_map)
                busnr = pci_to_OF_bus_map[busnr];
        if (busnr == 0xff)