[PATCH] powerpc: Move udbg code to arch/powerpc
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 11 Nov 2005 05:42:12 +0000 (16:42 +1100)
committerPaul Mackerras <paulus@samba.org>
Fri, 11 Nov 2005 11:23:34 +0000 (22:23 +1100)
Since the udbg code in ppc64 has no ppc32 equivalent, move it straight
over into arch/powerpc (and include/asm-powerpc for udbg.h).  In time,
we probably want to meld the various bits and pieces of 32-bit early
debugging code into udbg, but for now only include it on
CONFIG_PPC64=y builds.  The only change during the move is to
standardise the protecting #ifdef/#define in udbg.h, and move its
banner comment above the initial #ifdef (which seems to be normal
practice).

Built and booted on POWER5 LPAR (ARCH=powerpc and ARCH=ppc64).  Built
for 32bit multiplatform (ARCH=powerpc).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/udbg.c [moved from arch/ppc64/kernel/udbg.c with 100% similarity]
arch/powerpc/kernel/udbg_16550.c [moved from arch/ppc64/kernel/udbg_16550.c with 100% similarity]
arch/powerpc/kernel/udbg_scc.c [moved from arch/ppc64/kernel/udbg_scc.c with 100% similarity]
arch/ppc64/kernel/Makefile
include/asm-powerpc/udbg.h [moved from include/asm-ppc64/udbg.h with 90% similarity]

index c04bbd3..c68eace 100644 (file)
@@ -16,7 +16,7 @@ obj-y                         := semaphore.o cputable.o ptrace.o syscalls.o \
 obj-$(CONFIG_PPC64)            += setup_64.o binfmt_elf32.o sys_ppc32.o \
                                   signal_64.o ptrace32.o systbl.o \
                                   paca.o ioctl32.o cpu_setup_power4.o \
-                                  firmware.o sysfs.o
+                                  firmware.o sysfs.o udbg.o
 obj-$(CONFIG_ALTIVEC)          += vecemu.o vector.o
 obj-$(CONFIG_POWER4)           += idle_power4.o
 obj-$(CONFIG_PPC_OF)           += of_device.o
@@ -29,6 +29,10 @@ obj-$(CONFIG_RTAS_PROC)              += rtas-proc.o
 obj-$(CONFIG_LPARCFG)          += lparcfg.o
 obj-$(CONFIG_IBMVIO)           += vio.o
 obj-$(CONFIG_GENERIC_TBSYNC)   += smp-tbsync.o
+obj-$(CONFIG_PPC_PSERIES)      += udbg_16550.o
+obj-$(CONFIG_PPC_MAPLE)                += udbg_16550.o
+udbgscc-$(CONFIG_PPC64)                := udbg_scc.o
+obj-$(CONFIG_PPC_PMAC)         += $(udbgscc-y)
 
 ifeq ($(CONFIG_PPC_MERGE),y)
 
index 58b19f1..7bf1a6f 100644 (file)
@@ -13,7 +13,6 @@ endif
 
 obj-y               += idle.o dma.o \
                        align.o \
-                       udbg.o \
                        rtc.o \
                        iommu.o vdso.o
 obj-y += vdso32/ vdso64/
@@ -27,8 +26,6 @@ ifneq ($(CONFIG_PPC_MERGE),y)
 obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o
 endif
 
-obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o
-
 obj-$(CONFIG_KEXEC)            += machine_kexec.o
 obj-$(CONFIG_MODULES)          += module.o
 ifneq ($(CONFIG_PPC_MERGE),y)
@@ -40,10 +37,6 @@ obj-$(CONFIG_BOOTX_TEXT)     += btext.o
 endif
 obj-$(CONFIG_HVCS)             += hvcserver.o
 
-obj-$(CONFIG_PPC_PMAC)         += udbg_scc.o
-
-obj-$(CONFIG_PPC_MAPLE)                += udbg_16550.o
-
 obj-$(CONFIG_KPROBES)          += kprobes.o
 
 ifneq ($(CONFIG_PPC_MERGE),y)
similarity index 90%
rename from include/asm-ppc64/udbg.h
rename to include/asm-powerpc/udbg.h
index e3b9279..a383383 100644 (file)
@@ -1,9 +1,3 @@
-#ifndef __UDBG_HDR
-#define __UDBG_HDR
-
-#include <linux/compiler.h>
-#include <linux/init.h>
-
 /*
  * c 2001 PPC 64 Team, IBM Corp
  *
@@ -13,6 +7,12 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#ifndef _ASM_POWERPC_UDBG_H
+#define _ASM_POWERPC_UDBG_H
+
+#include <linux/compiler.h>
+#include <linux/init.h>
+
 extern void (*udbg_putc)(unsigned char c);
 extern unsigned char (*udbg_getc)(void);
 extern int (*udbg_getc_poll)(void);
@@ -28,4 +28,4 @@ extern void udbg_init_uart(void __iomem *comport, unsigned int speed);
 
 struct device_node;
 extern void udbg_init_scc(struct device_node *np);
-#endif
+#endif /* _ASM_POWERPC_UDBG_H */