]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/embedded6xx/linkstation.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / embedded6xx / linkstation.c
index bd5ca58345a1dc0e2bea91aecadd1f58ddced273..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
@@ -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)