summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/83xx/mpc832x_mds.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-11-21 18:42:44 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-11-21 18:42:44 -0800
commit0f9005a6f7a82f4aacbd72f7b92322a8ca1c3f97 (patch)
tree8b63f4a8add7f1bfbba02f9ddbbe26e7943afb21 /arch/powerpc/platforms/83xx/mpc832x_mds.c
parentc5dd27337a70b34cc400120e70a80fcb84c4fd7a (diff)
parent8746ed3dae14e87e9f7ad8e44649b72e22b33274 (diff)
Merge branch 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Fix ucc_geth of_device discovery on mpc832x [POWERPC] Revert "[POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class" [POWERPC] Revert "[POWERPC] Enable generic rtc hook for the MPC8349 mITX"
Diffstat (limited to 'arch/powerpc/platforms/83xx/mpc832x_mds.c')
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_mds.c19
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 54dea9d42dc..a43ac71ab74 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -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>
@@ -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)
{