diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 20:33:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 20:33:12 -0500 |
commit | 9d8f057acbd38d8177cf2ffd5e151d52c2477372 (patch) | |
tree | 1c3387b045a8a487ff99bf3abed1cdf41670f6e6 /drivers/serial/serial_lh7a40x.c | |
parent | 591eb85ecd7e6eb8596c6129ae074e16636b99f4 (diff) | |
parent | 91bca4b3e2f1aaaf67e62a36914f33ca1e7d5a06 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial:
[SERIAL] Merge avlab serial board entries in parport_serial
[SERIAL] kernel console should send CRLF not LFCR
Diffstat (limited to 'drivers/serial/serial_lh7a40x.c')
-rw-r--r-- | drivers/serial/serial_lh7a40x.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c index 04186eaae227..aa521b8e0d4e 100644 --- a/drivers/serial/serial_lh7a40x.c +++ b/drivers/serial/serial_lh7a40x.c | |||
@@ -543,6 +543,12 @@ static struct uart_port_lh7a40x lh7a40x_ports[DEV_NR] = { | |||
543 | #else | 543 | #else |
544 | # define LH7A40X_CONSOLE &lh7a40x_console | 544 | # define LH7A40X_CONSOLE &lh7a40x_console |
545 | 545 | ||
546 | static void lh7a40xuart_console_putchar(struct uart_port *port, int ch) | ||
547 | { | ||
548 | while (UR(port, UART_R_STATUS) & nTxRdy) | ||
549 | ; | ||
550 | UR(port, UART_R_DATA) = ch; | ||
551 | } | ||
546 | 552 | ||
547 | static void lh7a40xuart_console_write (struct console* co, | 553 | static void lh7a40xuart_console_write (struct console* co, |
548 | const char* s, | 554 | const char* s, |
@@ -556,16 +562,7 @@ static void lh7a40xuart_console_write (struct console* co, | |||
556 | UR (port, UART_R_INTEN) = 0; /* Disable all interrupts */ | 562 | UR (port, UART_R_INTEN) = 0; /* Disable all interrupts */ |
557 | BIT_SET (port, UART_R_CON, UARTEN | SIRDIS); /* Enable UART */ | 563 | BIT_SET (port, UART_R_CON, UARTEN | SIRDIS); /* Enable UART */ |
558 | 564 | ||
559 | for (; count-- > 0; ++s) { | 565 | uart_console_write(port, s, count, lh7a40xuart_console_putchar); |
560 | while (UR (port, UART_R_STATUS) & nTxRdy) | ||
561 | ; | ||
562 | UR (port, UART_R_DATA) = *s; | ||
563 | if (*s == '\n') { | ||
564 | while ((UR (port, UART_R_STATUS) & TxBusy)) | ||
565 | ; | ||
566 | UR (port, UART_R_DATA) = '\r'; | ||
567 | } | ||
568 | } | ||
569 | 566 | ||
570 | /* Wait until all characters are sent */ | 567 | /* Wait until all characters are sent */ |
571 | while (UR (port, UART_R_STATUS) & TxBusy) | 568 | while (UR (port, UART_R_STATUS) & TxBusy) |