linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / serial / serial_lh7a40x.c
index aa521b8..04186ea 100644 (file)
@@ -543,12 +543,6 @@ static struct uart_port_lh7a40x lh7a40x_ports[DEV_NR] = {
 #else
 # define LH7A40X_CONSOLE &lh7a40x_console
 
-static void lh7a40xuart_console_putchar(struct uart_port *port, int ch)
-{
-       while (UR(port, UART_R_STATUS) & nTxRdy)
-               ;
-       UR(port, UART_R_DATA) = ch;
-}
 
 static void lh7a40xuart_console_write (struct console* co,
                                       const char* s,
@@ -562,7 +556,16 @@ static void lh7a40xuart_console_write (struct console* co,
        UR (port, UART_R_INTEN) = 0;            /* Disable all interrupts */
        BIT_SET (port, UART_R_CON, UARTEN | SIRDIS); /* Enable UART */
 
-       uart_console_write(port, s, count, lh7a40xuart_console_putchar);
+       for (; count-- > 0; ++s) {
+               while (UR (port, UART_R_STATUS) & nTxRdy)
+                       ;
+               UR (port, UART_R_DATA) = *s;
+               if (*s == '\n') {
+                       while ((UR (port, UART_R_STATUS) & TxBusy))
+                               ;
+                       UR (port, UART_R_DATA) = '\r';
+               }
+       }
 
                                /* Wait until all characters are sent */
        while (UR (port, UART_R_STATUS) & TxBusy)