From c41f250a9ea89653c1db178b20be2e6c0827a1f1 Mon Sep 17 00:00:00 2001 From: Kim Phillips Date: Tue, 21 Nov 2006 18:19:42 -0600 Subject: [PATCH] --- yaml --- r: 41051 b: refs/heads/master c: 8746ed3dae14e87e9f7ad8e44649b72e22b33274 h: refs/heads/master i: 41049: ebbb8400204f89a4d666cd7d38faaefac3a361cf 41047: 96d6f733acd0191c2b298eb42049d7fad15d068f v: v3 --- [refs] | 2 +- .../arch/powerpc/platforms/83xx/mpc832x_mds.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 06ef86076245..fefc586a5b35 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: df9c23095fc8652798c41dd860676d3dafb2f1dc +refs/heads/master: 8746ed3dae14e87e9f7ad8e44649b72e22b33274 diff --git a/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c b/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c index 54dea9d42dc9..a43ac71ab740 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -136,6 +137,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) {