X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fserial%2Fserial_lh7a40x.c;h=04186eaae227053401af018fb65c4504853c863c;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=aa521b8e0d4e3a06a3c0c53ca7929a72d0b96763;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c index aa521b8e0..04186eaae 100644 --- a/drivers/serial/serial_lh7a40x.c +++ b/drivers/serial/serial_lh7a40x.c @@ -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)