diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-15 20:13:06 -0400 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-15 20:59:27 -0400 |
| commit | afbcdd97bf117bc2d01b865a32f78f662437a4d8 (patch) | |
| tree | b170f30f16bb8bb77477326ad604de7c49808a60 /arch/powerpc/kernel | |
| parent | 54bb7f4bda0ee49f39dc593c2d73fe6053a99dbb (diff) | |
powerpc/wsp: Fix early debug build
When reworking udbg_16550.c I forgot to remove the old and now useless
code for the CONFIG_PPC_EARLY_DEBUG_WSP case, which doesn't build as
a result. I also missed a cast.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
| -rw-r--r-- | arch/powerpc/kernel/udbg_16550.c | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index 25c58e81a009..75702e207b29 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b/arch/powerpc/kernel/udbg_16550.c | |||
| @@ -300,45 +300,9 @@ void __init udbg_init_40x_realmode(void) | |||
| 300 | 300 | ||
| 301 | #ifdef CONFIG_PPC_EARLY_DEBUG_WSP | 301 | #ifdef CONFIG_PPC_EARLY_DEBUG_WSP |
| 302 | 302 | ||
| 303 | static void udbg_wsp_flush(void) | ||
| 304 | { | ||
| 305 | if (udbg_comport) { | ||
| 306 | while ((readb(&udbg_comport->lsr) & LSR_THRE) == 0) | ||
| 307 | /* wait for idle */; | ||
| 308 | } | ||
| 309 | } | ||
| 310 | |||
| 311 | static void udbg_wsp_putc(char c) | ||
| 312 | { | ||
| 313 | if (udbg_comport) { | ||
| 314 | if (c == '\n') | ||
| 315 | udbg_wsp_putc('\r'); | ||
| 316 | udbg_wsp_flush(); | ||
| 317 | writeb(c, &udbg_comport->thr); eieio(); | ||
| 318 | } | ||
| 319 | } | ||
| 320 | |||
| 321 | static int udbg_wsp_getc(void) | ||
| 322 | { | ||
| 323 | if (udbg_comport) { | ||
| 324 | while ((readb(&udbg_comport->lsr) & LSR_DR) == 0) | ||
| 325 | ; /* wait for char */ | ||
| 326 | return readb(&udbg_comport->rbr); | ||
| 327 | } | ||
| 328 | return -1; | ||
| 329 | } | ||
| 330 | |||
| 331 | static int udbg_wsp_getc_poll(void) | ||
| 332 | { | ||
| 333 | if (udbg_comport) | ||
| 334 | if (readb(&udbg_comport->lsr) & LSR_DR) | ||
| 335 | return readb(&udbg_comport->rbr); | ||
| 336 | return -1; | ||
| 337 | } | ||
| 338 | |||
| 339 | void __init udbg_init_wsp(void) | 303 | void __init udbg_init_wsp(void) |
| 340 | { | 304 | { |
| 341 | udbg_uart_init_mmio(WSP_UART_VIRT, 1); | 305 | udbg_uart_init_mmio((void *)WSP_UART_VIRT, 1); |
| 342 | udbg_uart_setup(57600, 50000000); | 306 | udbg_uart_setup(57600, 50000000); |
| 343 | } | 307 | } |
| 344 | 308 | ||
