From 62de9ee32c16270522ee21dd2ee0141d44a36fe8 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Fri, 6 Feb 2004 14:15:35 +1100 Subject: [PATCH] ppc32: Fix PCI<->OF linkage for G5s AGP bus --- arch/ppc/kernel/pci.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c index 6ded5edaab9f8..bb1a292013306 100644 --- a/arch/ppc/kernel/pci.c +++ b/arch/ppc/kernel/pci.c @@ -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) -- 2.53.0