diff options
author | Li Yang <leoli@freescale.com> | 2006-10-11 19:04:22 +0800 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-10-16 15:53:30 +1000 |
commit | f5a37b066165f9938a93653f6940f3dc85ce751d (patch) | |
tree | 0096aa8764289dbc609e8d875b4d108fcc9897dd /arch/powerpc/platforms/83xx/mpc8360e_pb.c | |
parent | 7d2bd30f67e231920091d55d0fffc3a4bf43e68a (diff) | |
download | linux-stable-f5a37b066165f9938a93653f6940f3dc85ce751d.tar.gz linux-stable-f5a37b066165f9938a93653f6940f3dc85ce751d.tar.bz2 linux-stable-f5a37b066165f9938a93653f6940f3dc85ce751d.zip |
[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 c0191900fc25..1a523c81c06e 100644 --- a/arch/powerpc/platforms/83xx/mpc8360e_pb.c +++ b/arch/powerpc/platforms/83xx/mpc8360e_pb.c @@ -30,6 +30,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> @@ -141,6 +142,24 @@ static void __init mpc8360_sys_setup_arch(void) #endif } +static int __init mpc8360_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(mpc8360_declare_of_platform_devices); + void __init mpc8360_sys_init_IRQ(void) { |