]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/pci_64.c
Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / pci_64.c
index 39fadc6e149219771985bfc1d697a47afe27f885..586962f65c2a033d59a240e5daf85ece91859532 100644 (file)
@@ -560,9 +560,14 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
         * G5 machines... So when something asks for bus 0 io base
         * (bus 0 is HT root), we return the AGP one instead.
         */
-       if (machine_is_compatible("MacRISC4"))
-               if (in_bus == 0)
+       if (in_bus == 0 && machine_is_compatible("MacRISC4")) {
+               struct device_node *agp;
+
+               agp = of_find_compatible_node(NULL, NULL, "u3-agp");
+               if (agp)
                        in_bus = 0xf0;
+               of_node_put(agp);
+       }
 
        /* That syscall isn't quite compatible with PCI domains, but it's
         * used on pre-domains setup. We return the first match