aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/udbg.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-11-23 01:57:25 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 22:49:54 -0500
commit51d3082fe6e55aecfa17113dbe98077c749f724c (patch)
tree9a1e2355d5988d8cc1ca511d53c1bb24b0baa17f /arch/powerpc/kernel/udbg.c
parent463ce0e103f419f51b1769111e73fe8bb305d0ec (diff)
[PATCH] powerpc: Unify udbg (#2)
This patch unifies udbg for both ppc32 and ppc64 when building the merged achitecture. xmon now has a single "back end". The powermac udbg stuff gets enriched with some ADB capabilities and btext output. In addition, the early_init callback is now called on ppc32 as well, approx. in the same order as ppc64 regarding device-tree manipulations. The init sequences of ppc32 and ppc64 are getting closer, I'll unify them in a later patch. For now, you can force udbg to the scc using "sccdbg" or to btext using "btextdbg" on powermacs. I'll implement a cleaner way of forcing udbg output to something else than the autodetected OF output device in a later patch. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/udbg.c')
-rw-r--r--arch/powerpc/kernel/udbg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 2e372477d22a..cc2df5e61bb0 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -16,8 +16,8 @@
16#include <linux/console.h> 16#include <linux/console.h>
17#include <asm/processor.h> 17#include <asm/processor.h>
18 18
19void (*udbg_putc)(unsigned char c); 19void (*udbg_putc)(char c);
20unsigned char (*udbg_getc)(void); 20char (*udbg_getc)(void);
21int (*udbg_getc_poll)(void); 21int (*udbg_getc_poll)(void);
22 22
23/* udbg library, used by xmon et al */ 23/* udbg library, used by xmon et al */
@@ -78,7 +78,7 @@ int udbg_read(char *buf, int buflen)
78#define UDBG_BUFSIZE 256 78#define UDBG_BUFSIZE 256
79void udbg_printf(const char *fmt, ...) 79void udbg_printf(const char *fmt, ...)
80{ 80{
81 unsigned char buf[UDBG_BUFSIZE]; 81 char buf[UDBG_BUFSIZE];
82 va_list args; 82 va_list args;
83 83
84 va_start(args, fmt); 84 va_start(args, fmt);
@@ -116,6 +116,8 @@ void __init disable_early_printk(void)
116/* called by setup_system */ 116/* called by setup_system */
117void register_early_udbg_console(void) 117void register_early_udbg_console(void)
118{ 118{
119 if (early_console_initialized)
120 return;
119 early_console_initialized = 1; 121 early_console_initialized = 1;
120 register_console(&udbg_console); 122 register_console(&udbg_console);
121} 123}