aboutsummaryrefslogtreecommitdiff
path: root/arch/ppc64/kernel/udbg.c
diff options
context:
space:
mode:
authorMilton Miller <miltonm@bga.com>2005-09-06 11:56:42 +1000
committerPaul Mackerras <paulus@samba.org>2005-09-06 16:07:36 +1000
commitc8f1c8be629ee34991fdba8bfe46a5c455393209 (patch)
tree66f218e641e87a0ca9ade7601345229b6557761e /arch/ppc64/kernel/udbg.c
parent7f853352e79bf57c4ee279b7458ed0c072e2be76 (diff)
[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 <miltonm@bga.com> Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/kernel/udbg.c')
-rw-r--r--arch/ppc64/kernel/udbg.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/ppc64/kernel/udbg.c b/arch/ppc64/kernel/udbg.c
index 67e208500ae..2f82e7d7902 100644
--- a/arch/ppc64/kernel/udbg.c
+++ b/arch/ppc64/kernel/udbg.c
@@ -20,14 +20,18 @@
#include <asm/io.h>
#include <asm/prom.h>
+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;