[PARISC] [MUX] Mux driver updates
authorRyan Bradetich <rbrad@parisc-linux.org>
Fri, 3 Nov 2006 05:52:41 +0000 (05:52 +0000)
committerKyle McMartin <kyle@ubuntu.com>
Fri, 8 Dec 2006 05:34:08 +0000 (00:34 -0500)
This patch changes the Mux console to
use the Mux hardware instead of the PDC
Software console.

Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
drivers/serial/mux.c

index ec57a616788bdfa8445265eadd99f7ac026e80c8..6408b9b1561a128de25fc340a58d1d8507845c4c 100644 (file)
@@ -376,8 +376,17 @@ static void mux_poll(unsigned long unused)
 #ifdef CONFIG_SERIAL_MUX_CONSOLE
 static void mux_console_write(struct console *co, const char *s, unsigned count)
 {
-        while(count--)
-                pdc_iodc_putc(*s++);
+       /* Wait until the FIFO drains. */
+       while(UART_GET_FIFO_CNT(&mux_ports[0].port))
+               udelay(1);
+
+       while(count--) {
+               if(*s == '\n') {
+                       UART_PUT_CHAR(&mux_ports[0].port, '\r');
+               }
+               UART_PUT_CHAR(&mux_ports[0].port, *s++);
+       }
+
 }
 
 static int mux_console_setup(struct console *co, char *options)