]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/serial/au1x00_uart.c
[SERIAL] kernel console should send CRLF not LFCR
[mv-sheeva.git] / drivers / serial / au1x00_uart.c
index 344022fe53ef870522700ef2e92e57e6b25c1945..29f94bbb79be66fdde4b7096fd5caf1b12c0d5d0 100644 (file)
@@ -1121,6 +1121,14 @@ static inline void wait_for_xmitr(struct uart_8250_port *up)
        }
 }
 
+static void au1x00_console_putchar(struct uart_port *port, int ch)
+{
+       struct uart_8250_port *up = (struct uart_8250_port *)port;
+
+       wait_for_xmitr(up);
+       serial_out(up, UART_TX, ch);
+}
+
 /*
  *     Print a string to the serial port trying not to disturb
  *     any possible real use of the port...
@@ -1132,7 +1140,6 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
 {
        struct uart_8250_port *up = &serial8250_ports[co->index];
        unsigned int ier;
-       int i;
 
        /*
         *      First save the UER then disable the interrupts
@@ -1140,22 +1147,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
        ier = serial_in(up, UART_IER);
        serial_out(up, UART_IER, 0);
 
-       /*
-        *      Now, do each character
-        */
-       for (i = 0; i < count; i++, s++) {
-               wait_for_xmitr(up);
-
-               /*
-                *      Send the character out.
-                *      If a LF, also do CR...
-                */
-               serial_out(up, UART_TX, *s);
-               if (*s == 10) {
-                       wait_for_xmitr(up);
-                       serial_out(up, UART_TX, 13);
-               }
-       }
+       uart_console_write(&up->port, s, count, au1x00_console_putchar);
 
        /*
         *      Finally, wait for transmitter to become empty