diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-03-20 20:00:09 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-03-20 20:00:09 +0000 |
commit | d358788f3f30113e49882187d794832905e42592 (patch) | |
tree | 8c796ee4bf719dad4d3947c03cef2f3fd6cb5940 /drivers/serial/8250_early.c | |
parent | 7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff) |
[SERIAL] kernel console should send CRLF not LFCR
Glen Turner reported that writing LFCR rather than the more
traditional CRLF causes issues with some terminals.
Since this aflicts many serial drivers, extract the common code
to a library function (uart_console_write) and arrange for each
driver to supply a "putchar" function.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial/8250_early.c')
-rw-r--r-- | drivers/serial/8250_early.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/serial/8250_early.c b/drivers/serial/8250_early.c index 59ba5d993b4..7e511199b4c 100644 --- a/drivers/serial/8250_early.c +++ b/drivers/serial/8250_early.c @@ -74,7 +74,7 @@ static void __init wait_for_xmitr(struct uart_port *port) } } -static void __init putc(struct uart_port *port, unsigned char c) +static void __init putc(struct uart_port *port, int c) { wait_for_xmitr(port); serial_out(port, UART_TX, c); @@ -89,12 +89,7 @@ static void __init early_uart_write(struct console *console, const char *s, unsi ier = serial_in(port, UART_IER); serial_out(port, UART_IER, 0); - while (*s && count-- > 0) { - putc(port, *s); - if (*s == '\n') - putc(port, '\r'); - s++; - } + uart_console_write(port, s, count, putc); /* Wait for transmitter to become empty and restore the IER */ wait_for_xmitr(port); |