diff options
| -rw-r--r-- | arch/powerpc/platforms/83xx/mpc832x_mds.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c index 54dea9d42dc9..a43ac71ab740 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/root_dev.h> | 24 | #include <linux/root_dev.h> |
| 25 | #include <linux/initrd.h> | 25 | #include <linux/initrd.h> |
| 26 | 26 | ||
| 27 | #include <asm/of_device.h> | ||
| 27 | #include <asm/system.h> | 28 | #include <asm/system.h> |
| 28 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
| 29 | #include <asm/time.h> | 30 | #include <asm/time.h> |
| @@ -136,6 +137,24 @@ static void __init mpc832x_sys_setup_arch(void) | |||
| 136 | #endif | 137 | #endif |
| 137 | } | 138 | } |
| 138 | 139 | ||
| 140 | static int __init mpc832x_declare_of_platform_devices(void) | ||
| 141 | { | ||
| 142 | struct device_node *np; | ||
| 143 | |||
| 144 | for (np = NULL; (np = of_find_compatible_node(np, "network", | ||
| 145 | "ucc_geth")) != NULL;) { | ||
| 146 | int ucc_num; | ||
| 147 | char bus_id[BUS_ID_SIZE]; | ||
| 148 | |||
| 149 | ucc_num = *((uint *) get_property(np, "device-id", NULL)) - 1; | ||
| 150 | snprintf(bus_id, BUS_ID_SIZE, "ucc_geth.%u", ucc_num); | ||
| 151 | of_platform_device_create(np, bus_id, NULL); | ||
| 152 | } | ||
| 153 | |||
| 154 | return 0; | ||
| 155 | } | ||
| 156 | device_initcall(mpc832x_declare_of_platform_devices); | ||
| 157 | |||
| 139 | void __init mpc832x_sys_init_IRQ(void) | 158 | void __init mpc832x_sys_init_IRQ(void) |
| 140 | { | 159 | { |
| 141 | 160 | ||
