]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] Fix MPC8360EMDS PB board support
authorLi Yang <leoli@freescale.com>
Wed, 11 Oct 2006 11:04:22 +0000 (19:04 +0800)
committerPaul Mackerras <paulus@samba.org>
Mon, 16 Oct 2006 05:53:30 +0000 (15:53 +1000)
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>
arch/powerpc/platforms/83xx/Kconfig
arch/powerpc/platforms/83xx/Makefile
arch/powerpc/platforms/83xx/mpc8360e_pb.c

index 0975e94ac7c469bc416b0f9fab57de41e4ff0a52..7edb6b461382b407203b5c1929ae0fd7e4ba2487 100644 (file)
@@ -32,6 +32,13 @@ config MPC834x_ITX
          Be aware that PCI initialization is the bootloader's
          responsiblilty.
 
+config MPC8360E_PB
+       bool "Freescale MPC8360E PB"
+       select DEFAULT_UIMAGE
+       select QUICC_ENGINE
+       help
+         This option enables support for the MPC836x EMDS Processor Board.
+
 endchoice
 
 config PPC_MPC832x
@@ -46,4 +53,10 @@ config MPC834x
        select PPC_INDIRECT_PCI
        default y if MPC834x_SYS || MPC834x_ITX
 
+config PPC_MPC836x
+       bool
+       select PPC_UDBG_16550
+       select PPC_INDIRECT_PCI
+       default y if MPC8360E_PB
+
 endmenu
index 9387a110d28aa4f410b9f226648c9277e0ca9b07..e60fd7567fcd4f6523c8b5961e43b13006ca28d2 100644 (file)
@@ -5,3 +5,4 @@ obj-y                           := misc.o
 obj-$(CONFIG_PCI)              += pci.o
 obj-$(CONFIG_MPC834x_SYS)      += mpc834x_sys.o
 obj-$(CONFIG_MPC834x_ITX)      += mpc834x_itx.o
+obj-$(CONFIG_MPC8360E_PB)       += mpc8360e_pb.o
index c0191900fc251b974cac3a2b7735768d915a8caa..1a523c81c06e528de4ac67bfe05d384ff054d6f5 100644 (file)
@@ -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)
 {