diff options
author | Li Yang <leoli@freescale.com> | 2006-10-11 07:04:22 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-10-16 01:53:30 -0400 |
commit | f5a37b066165f9938a93653f6940f3dc85ce751d (patch) | |
tree | 0096aa8764289dbc609e8d875b4d108fcc9897dd /arch/powerpc/platforms/83xx/mpc8360e_pb.c | |
parent | 7d2bd30f67e231920091d55d0fffc3a4bf43e68a (diff) |
[POWERPC] Fix MPC8360EMDS PB board support
MPC8360EMDS PB support is broken as some code was missing
in last submission. This patch adds missing code and makes
MPC8360EMDS PB support working.
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/83xx/mpc8360e_pb.c')
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc8360e_pb.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc8360e_pb.c b/arch/powerpc/platforms/83xx/mpc8360e_pb.c index c0191900fc2..1a523c81c06 100644 --- a/arch/powerpc/platforms/83xx/mpc8360e_pb.c +++ b/arch/powerpc/platforms/83xx/mpc8360e_pb.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/root_dev.h> | 30 | #include <linux/root_dev.h> |
31 | #include <linux/initrd.h> | 31 | #include <linux/initrd.h> |
32 | 32 | ||
33 | #include <asm/of_device.h> | ||
33 | #include <asm/system.h> | 34 | #include <asm/system.h> |
34 | #include <asm/atomic.h> | 35 | #include <asm/atomic.h> |
35 | #include <asm/time.h> | 36 | #include <asm/time.h> |
@@ -141,6 +142,24 @@ static void __init mpc8360_sys_setup_arch(void) | |||
141 | #endif | 142 | #endif |
142 | } | 143 | } |
143 | 144 | ||
145 | static int __init mpc8360_declare_of_platform_devices(void) | ||
146 | { | ||
147 | struct device_node *np; | ||
148 | |||
149 | for (np = NULL; (np = of_find_compatible_node(np, "network", | ||
150 | "ucc_geth")) != NULL;) { | ||
151 | int ucc_num; | ||
152 | char bus_id[BUS_ID_SIZE]; | ||
153 | |||
154 | ucc_num = *((uint *) get_property(np, "device-id", NULL)) - 1; | ||
155 | snprintf(bus_id, BUS_ID_SIZE, "ucc_geth.%u", ucc_num); | ||
156 | of_platform_device_create(np, bus_id, NULL); | ||
157 | } | ||
158 | |||
159 | return 0; | ||
160 | } | ||
161 | device_initcall(mpc8360_declare_of_platform_devices); | ||
162 | |||
144 | void __init mpc8360_sys_init_IRQ(void) | 163 | void __init mpc8360_sys_init_IRQ(void) |
145 | { | 164 | { |
146 | 165 | ||