]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/83xx/mpc832x_mds.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / 83xx / mpc832x_mds.c
index 54dea9d42dc96bc8724d4757561a2b01e1b24746..4d471190be8dc8ea877ca35fbc893b29b42fc635 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/root_dev.h>
 #include <linux/initrd.h>
 
+#include <asm/of_device.h>
 #include <asm/system.h>
 #include <asm/atomic.h>
 #include <asm/time.h>
@@ -96,15 +97,13 @@ static void __init mpc832x_sys_setup_arch(void)
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
                add_bridge(np);
-
-       ppc_md.pci_swizzle = common_swizzle;
        ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
 
 #ifdef CONFIG_QUICC_ENGINE
        qe_reset();
 
-       if ((np = of_find_node_by_name(np, "par_io")) != NULL) {
+       if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
                par_io_init(np);
                of_node_put(np);
 
@@ -136,6 +135,24 @@ static void __init mpc832x_sys_setup_arch(void)
 #endif
 }
 
+static int __init mpc832x_declare_of_platform_devices(void)
+{
+       struct device_node *np;
+
+       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);
+       }
+
+       return 0;
+}
+device_initcall(mpc832x_declare_of_platform_devices);
+
 void __init mpc832x_sys_init_IRQ(void)
 {