summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/powermac/udbg_scc.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-11-30 16:54:12 +1100
committerPaul Mackerras <paulus@samba.org>2006-01-09 14:51:22 +1100
commitbb6b9b28d6847bc71f910e2e82c9040ff4b97ec0 (patch)
tree97b0acaade2d32ddb37147ff5112318f6c292cf8 /arch/powerpc/platforms/powermac/udbg_scc.c
parent54b9a9aedc990dd2aefc45ab16d84f245cb7d8d0 (diff)
downloadlwn-bb6b9b28d6847bc71f910e2e82c9040ff4b97ec0.tar.gz
lwn-bb6b9b28d6847bc71f910e2e82c9040ff4b97ec0.zip
[PATCH] powerpc: udbg updates
The udbg low level io layer has an issue with udbg_getc() returning a char (unsigned on ppc) instead of an int, thus the -1 if you had no available input device could end up turned into 0xff, filling your display with bogus characters. This fixes it, along with adding a little blob to xmon to do a delay before exiting when getting an EOF and fixing the detection of ADB keyboards in udbg_adb.c Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/powermac/udbg_scc.c')
-rw-r--r--arch/powerpc/platforms/powermac/udbg_scc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powermac/udbg_scc.c b/arch/powerpc/platforms/powermac/udbg_scc.c
index df6dec49c4c7..e87d53acfb61 100644
--- a/arch/powerpc/platforms/powermac/udbg_scc.c
+++ b/arch/powerpc/platforms/powermac/udbg_scc.c
@@ -47,14 +47,14 @@ static int udbg_scc_getc_poll(void)
return -1;
}
-static char udbg_scc_getc(void)
+static int udbg_scc_getc(void)
{
if (sccc) {
while ((in_8(sccc) & SCC_RXRDY) == 0)
;
return in_8(sccd);
}
- return 0;
+ return -1;
}
static unsigned char scc_inittab[] = {