]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/embedded6xx/linkstation.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / embedded6xx / linkstation.c
index f4d0a7a603f528a09b1ba16ef17161b63be3320e..2ca7be65c2d2c17b5bde858b2c2940aecfc71989 100644 (file)
  */
 
 #include <linux/kernel.h>
-#include <linux/pci.h>
 #include <linux/initrd.h>
 #include <linux/mtd/physmap.h>
+#include <linux/of_platform.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,6 +55,19 @@ static struct mtd_partition linkstation_physmap_partitions[] = {
        },
 };
 
+static __initdata struct of_device_id of_bus_ids[] = {
+       { .type = "soc", },
+       { .compatible = "simple-bus", },
+       {},
+};
+
+static int __init declare_of_platform_devices(void)
+{
+       of_platform_bus_probe(NULL, of_bus_ids, NULL);
+       return 0;
+}
+machine_device_initcall(linkstation, declare_of_platform_devices);
+
 static int __init linkstation_add_bridge(struct device_node *dev)
 {
 #ifdef CONFIG_PCI
@@ -73,7 +87,7 @@ static int __init linkstation_add_bridge(struct device_node *dev)
                return -ENOMEM;
        hose->first_busno = bus_range ? bus_range[0] : 0;
        hose->last_busno = bus_range ? bus_range[1] : 0xff;
-       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 */
@@ -91,7 +105,7 @@ static void __init linkstation_setup_arch(void)
 #endif
 
        /* Lookup PCI host bridges */
-       for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
+       for_each_compatible_node(np, "pci", "mpc10x-pci")
                linkstation_add_bridge(np);
 
        printk(KERN_INFO "BUFFALO Network Attached Storage Series\n");
@@ -99,7 +113,7 @@ static void __init linkstation_setup_arch(void)
 }
 
 /*
- * 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)