diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-11-30 00:54:12 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-08 22:51:22 -0500 |
commit | bb6b9b28d6847bc71f910e2e82c9040ff4b97ec0 (patch) | |
tree | 97b0acaade2d32ddb37147ff5112318f6c292cf8 /arch/powerpc/kernel/udbg_16550.c | |
parent | 54b9a9aedc990dd2aefc45ab16d84f245cb7d8d0 (diff) |
[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/kernel/udbg_16550.c')
-rw-r--r-- | arch/powerpc/kernel/udbg_16550.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index 28a58da5592c..e58c048a7b19 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b/arch/powerpc/kernel/udbg_16550.c | |||
@@ -69,14 +69,14 @@ static int udbg_550_getc_poll(void) | |||
69 | return -1; | 69 | return -1; |
70 | } | 70 | } |
71 | 71 | ||
72 | static char udbg_550_getc(void) | 72 | static int udbg_550_getc(void) |
73 | { | 73 | { |
74 | if (udbg_comport) { | 74 | if (udbg_comport) { |
75 | while ((in_8(&udbg_comport->lsr) & LSR_DR) == 0) | 75 | while ((in_8(&udbg_comport->lsr) & LSR_DR) == 0) |
76 | /* wait for char */; | 76 | /* wait for char */; |
77 | return in_8(&udbg_comport->rbr); | 77 | return in_8(&udbg_comport->rbr); |
78 | } | 78 | } |
79 | return 0; | 79 | return -1; |
80 | } | 80 | } |
81 | 81 | ||
82 | void udbg_init_uart(void __iomem *comport, unsigned int speed, | 82 | void udbg_init_uart(void __iomem *comport, unsigned int speed, |