]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/sysdev/mv64x60_dev.c
Merge branch 'linus' into x86/signal
[linux-2.6-omap-h63xx.git] / arch / powerpc / sysdev / mv64x60_dev.c
index a132e0de8ca5a056ac1f7803c7fe5925a037cf31..b6bd775d2e222d765e5bbad2e986c5d9ac19def3 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/console.h>
 #include <linux/mv643xx.h>
 #include <linux/platform_device.h>
+#include <linux/of_platform.h>
 
 #include <asm/prom.h>
 
  * PowerPC of_platform_bus_type.  They support platform_bus_type instead.
  */
 
+static struct of_device_id __initdata of_mv64x60_devices[] = {
+       { .compatible = "marvell,mv64306-devctrl", },
+       {}
+};
+
 /*
  * Create MPSC platform devices
  */
@@ -287,10 +293,8 @@ static int __init mv64x60_eth_device_setup(struct device_node *np, int id,
                return -ENODEV;
 
        prop = of_get_property(phy, "reg", NULL);
-       if (prop) {
-               pdata.force_phy_addr = 1;
-               pdata.phy_addr = *prop;
-       }
+       if (prop)
+               pdata.phy_addr = MV643XX_ETH_PHY_ADDR(*prop);
 
        of_node_put(phy);
 
@@ -484,6 +488,10 @@ static int __init mv64x60_device_setup(void)
                of_node_put(np);
        }
 
+       /* Now add every node that is on the device bus */
+       for_each_compatible_node(np, NULL, "marvell,mv64360")
+               of_platform_bus_probe(np, of_mv64x60_devices, NULL);
+
        return 0;
 }
 arch_initcall(mv64x60_device_setup);