aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/83xx/mpc8360e_pb.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-17 08:20:57 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-17 08:20:57 -0700
commit20f85957667ccc53183b5ffac22213d75e317408 (patch)
treed3db6c50c32dac25757d6f7dff977ccadc28a714 /arch/powerpc/platforms/83xx/mpc8360e_pb.c
parent7786ce192fc4917fb9b789dd823476ff8fd6cf66 (diff)
parent284a940675a64df253e3dffc60b09bb4bbb149e4 (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Check for offline nodes in pci NUMA code [POWERPC] Better check in show_instructions [POWERPC] POWER6 has 6 PMCs [POWERPC] Never panic when taking altivec exceptions from userspace [POWERPC] Fix IO Window Updates on P2P bridges. [POWERPC] Add Makefile entry for MPC832x_mds support [POWERPC] Fix MPC8360EMDS PB board support [POWERPC] ppc: Add missing calls to set_irq_regs [POWERPC] Off-by-one in /arch/ppc/platforms/mpc8* [POWERPC] Add DOS partition table support to mpc834x_itx_defconfig [POWERPC] spufs: fix support for read/write on cntl [POWERPC] Don't crash on cell with 2 BEs when !CONFIG_NUMA
Diffstat (limited to 'arch/powerpc/platforms/83xx/mpc8360e_pb.c')
-rw-r--r--arch/powerpc/platforms/83xx/mpc8360e_pb.c19
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 @@
#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)
{