From c8f1c8be629ee34991fdba8bfe46a5c455393209 Mon Sep 17 00:00:00 2001 From: Milton Miller Date: Tue, 6 Sep 2005 11:56:42 +1000 Subject: [PATCH] ppc64: Take udbg out of ppc_md Take udbg out of ppc_md. Allows us to not overwrite early udbg inits when assigning ppc_md. Signed-off-by: Milton Miller Signed-off-by: Anton Blanchard Signed-off-by: Paul Mackerras --- arch/ppc64/kernel/udbg.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'arch/ppc64/kernel/udbg.c') diff --git a/arch/ppc64/kernel/udbg.c b/arch/ppc64/kernel/udbg.c index 67e208500aea..2f82e7d7902b 100644 --- a/arch/ppc64/kernel/udbg.c +++ b/arch/ppc64/kernel/udbg.c @@ -20,14 +20,18 @@ #include #include +void (*udbg_putc)(unsigned char c); +unsigned char (*udbg_getc)(void); +int (*udbg_getc_poll)(void); + void udbg_puts(const char *s) { - if (ppc_md.udbg_putc) { + if (udbg_putc) { char c; if (s && *s != '\0') { while ((c = *s++) != '\0') - ppc_md.udbg_putc(c); + udbg_putc(c); } } #if 0 @@ -42,12 +46,12 @@ int udbg_write(const char *s, int n) int remain = n; char c; - if (!ppc_md.udbg_putc) + if (!udbg_putc) return 0; if (s && *s != '\0') { while (((c = *s++) != '\0') && (remain-- > 0)) { - ppc_md.udbg_putc(c); + udbg_putc(c); } } @@ -59,12 +63,12 @@ int udbg_read(char *buf, int buflen) char c, *p = buf; int i; - if (!ppc_md.udbg_getc) + if (!udbg_getc) return 0; for (i = 0; i < buflen; ++i) { do { - c = ppc_md.udbg_getc(); + c = udbg_getc(); } while (c == 0x11 || c == 0x13); if (c == 0) break; -- cgit v1.2.3