Skip to content

Commit 35cd878

Browse files
dgibsonpaulusmack
authored andcommitted
[PATCH] powerpc: Move udbg code to arch/powerpc
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>
1 parent a7df61a commit 35cd878

File tree

6 files changed

+12
-15
lines changed

6 files changed

+12
-15
lines changed

arch/powerpc/kernel/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ obj-y := semaphore.o cputable.o ptrace.o syscalls.o \
1616
obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
1717
signal_64.o ptrace32.o systbl.o \
1818
paca.o ioctl32.o cpu_setup_power4.o \
19-
firmware.o sysfs.o
19+
firmware.o sysfs.o udbg.o
2020
obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
2121
obj-$(CONFIG_POWER4) += idle_power4.o
2222
obj-$(CONFIG_PPC_OF) += of_device.o
@@ -29,6 +29,10 @@ obj-$(CONFIG_RTAS_PROC) += rtas-proc.o
2929
obj-$(CONFIG_LPARCFG) += lparcfg.o
3030
obj-$(CONFIG_IBMVIO) += vio.o
3131
obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o
32+
obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o
33+
obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o
34+
udbgscc-$(CONFIG_PPC64) := udbg_scc.o
35+
obj-$(CONFIG_PPC_PMAC) += $(udbgscc-y)
3236

3337
ifeq ($(CONFIG_PPC_MERGE),y)
3438

File renamed without changes.
File renamed without changes.
File renamed without changes.

arch/ppc64/kernel/Makefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ endif
1313

1414
obj-y += idle.o dma.o \
1515
align.o \
16-
udbg.o \
1716
rtc.o \
1817
iommu.o vdso.o
1918
obj-y += vdso32/ vdso64/
@@ -27,8 +26,6 @@ ifneq ($(CONFIG_PPC_MERGE),y)
2726
obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o
2827
endif
2928

30-
obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o
31-
3229
obj-$(CONFIG_KEXEC) += machine_kexec.o
3330
obj-$(CONFIG_MODULES) += module.o
3431
ifneq ($(CONFIG_PPC_MERGE),y)
@@ -40,10 +37,6 @@ obj-$(CONFIG_BOOTX_TEXT) += btext.o
4037
endif
4138
obj-$(CONFIG_HVCS) += hvcserver.o
4239

43-
obj-$(CONFIG_PPC_PMAC) += udbg_scc.o
44-
45-
obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o
46-
4740
obj-$(CONFIG_KPROBES) += kprobes.o
4841

4942
ifneq ($(CONFIG_PPC_MERGE),y)

include/asm-ppc64/udbg.h renamed to include/asm-powerpc/udbg.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
#ifndef __UDBG_HDR
2-
#define __UDBG_HDR
3-
4-
#include <linux/compiler.h>
5-
#include <linux/init.h>
6-
71
/*
82
* c 2001 PPC 64 Team, IBM Corp
93
*
@@ -13,6 +7,12 @@
137
* 2 of the License, or (at your option) any later version.
148
*/
159

10+
#ifndef _ASM_POWERPC_UDBG_H
11+
#define _ASM_POWERPC_UDBG_H
12+
13+
#include <linux/compiler.h>
14+
#include <linux/init.h>
15+
1616
extern void (*udbg_putc)(unsigned char c);
1717
extern unsigned char (*udbg_getc)(void);
1818
extern int (*udbg_getc_poll)(void);
@@ -28,4 +28,4 @@ extern void udbg_init_uart(void __iomem *comport, unsigned int speed);
2828

2929
struct device_node;
3030
extern void udbg_init_scc(struct device_node *np);
31-
#endif
31+
#endif /* _ASM_POWERPC_UDBG_H */

0 commit comments

Comments
 (0)