[POWERPC] Add 'mdio' to bus scan id list for platforms with QE UEC
[powerpc.git] / arch / powerpc / platforms / 83xx / mpc832x_mds.c
index 980d45c..94843ed 100644 (file)
@@ -41,7 +41,6 @@
 #include <asm/qe_ic.h>
 
 #include "mpc83xx.h"
-#include "mpc832x_mds.h"
 
 #undef DEBUG
 #ifdef DEBUG
@@ -105,26 +104,24 @@ static void __init mpc832x_sys_setup_arch(void)
                iounmap(bcsr_regs);
                of_node_put(np);
        }
-
 #endif                         /* CONFIG_QUICC_ENGINE */
 }
 
+static struct of_device_id mpc832x_ids[] = {
+       { .type = "soc", },
+       { .compatible = "soc", },
+       { .type = "qe", },
+       { .type = "mdio", },
+       {},
+};
+
 static int __init mpc832x_declare_of_platform_devices(void)
 {
-       struct device_node *np;
-
        if (!machine_is(mpc832x_mds))
                return 0;
 
-       for (np = NULL; (np = of_find_compatible_node(np, "network",
-                                       "ucc_geth")) != NULL;) {
-               int ucc_num;
-               char bus_id[BUS_ID_SIZE];
-
-               ucc_num = *((uint *) get_property(np, "device-id", NULL)) - 1;
-               snprintf(bus_id, BUS_ID_SIZE, "ucc_geth.%u", ucc_num);
-               of_platform_device_create(np, bus_id, NULL);
-       }
+       /* Publish the QE devices */
+       of_platform_bus_probe(NULL, mpc832x_ids, NULL);
 
        return 0;
 }
@@ -132,7 +129,6 @@ device_initcall(mpc832x_declare_of_platform_devices);
 
 static void __init mpc832x_sys_init_IRQ(void)
 {
-
        struct device_node *np;
 
        np = of_find_node_by_type(NULL, "ipic");