]> err.no Git - linux-2.6/blobdiff - arch/powerpc/platforms/embedded6xx/linkstation.c
[POWERPC] spufs: fix incorrect file descriptors in SPU coredump note names
[linux-2.6] / arch / powerpc / platforms / embedded6xx / linkstation.c
index b412f006a9c55a8dd0bd60ebd193ab1277872793..eb5d74e26fe9d3731fad5fa7b5fad7d5bec35678 100644 (file)
  */
 
 #include <linux/kernel.h>
-#include <linux/pci.h>
 #include <linux/initrd.h>
 #include <linux/mtd/physmap.h>
 
 #include <asm/time.h>
 #include <asm/prom.h>
 #include <asm/mpic.h>
-#include <asm/mpc10x.h>
 #include <asm/pci-bridge.h>
 
+#include "mpc10x.h"
+
 static struct mtd_partition linkstation_physmap_partitions[] = {
        {
                .name   = "mtd_firmimg",
@@ -54,8 +54,9 @@ static struct mtd_partition linkstation_physmap_partitions[] = {
        },
 };
 
-static int __init add_bridge(struct device_node *dev)
+static int __init linkstation_add_bridge(struct device_node *dev)
 {
+#ifdef CONFIG_PCI
        int len;
        struct pci_controller *hose;
        const int *bus_range;
@@ -67,18 +68,17 @@ static int __init add_bridge(struct device_node *dev)
                printk(KERN_WARNING "Can't get bus-range for %s, assume"
                                " bus 0\n", dev->full_name);
 
-       hose = pcibios_alloc_controller();
+       hose = pcibios_alloc_controller(dev);
        if (hose == NULL)
                return -ENOMEM;
        hose->first_busno = bus_range ? bus_range[0] : 0;
        hose->last_busno = bus_range ? bus_range[1] : 0xff;
-       hose->arch_data = dev;
-       setup_indirect_pci(hose, 0xfec00000, 0xfee00000);
+       setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0);
 
        /* Interpret the "ranges" property */
        /* This also maps the I/O region and sets isa_io/mem_base */
        pci_process_bridge_OF_ranges(hose, dev, 1);
-
+#endif
        return 0;
 }
 
@@ -91,15 +91,15 @@ static void __init linkstation_setup_arch(void)
 #endif
 
        /* Lookup PCI host bridges */
-       for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+       for_each_compatible_node(np, "pci", "mpc10x-pci")
+               linkstation_add_bridge(np);
 
        printk(KERN_INFO "BUFFALO Network Attached Storage Series\n");
        printk(KERN_INFO "(C) 2002-2005 BUFFALO INC.\n");
 }
 
 /*
- * Interrupt setup and service.  Interrrupts on the linkstation come
+ * Interrupt setup and service.  Interrupts on the linkstation come
  * from the four PCI slots plus onboard 8241 devices: I2C, DUART.
  */
 static void __init linkstation_init_IRQ(void)