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/8250.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/8250.c')
-rw-r--r-- | drivers/serial/8250.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 7aca22c9976d..5996d3cd0ed8 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -2182,6 +2182,14 @@ static inline void wait_for_xmitr(struct uart_8250_port *up, int bits) | |||
2182 | } | 2182 | } |
2183 | } | 2183 | } |
2184 | 2184 | ||
2185 | static void serial8250_console_putchar(struct uart_port *port, int ch) | ||
2186 | { | ||
2187 | struct uart_8250_port *up = (struct uart_8250_port *)port; | ||
2188 | |||
2189 | wait_for_xmitr(up, UART_LSR_THRE); | ||
2190 | serial_out(up, UART_TX, ch); | ||
2191 | } | ||
2192 | |||
2185 | /* | 2193 | /* |
2186 | * Print a string to the serial port trying not to disturb | 2194 | * Print a string to the serial port trying not to disturb |
2187 | * any possible real use of the port... | 2195 | * any possible real use of the port... |
@@ -2193,7 +2201,6 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) | |||
2193 | { | 2201 | { |
2194 | struct uart_8250_port *up = &serial8250_ports[co->index]; | 2202 | struct uart_8250_port *up = &serial8250_ports[co->index]; |
2195 | unsigned int ier; | 2203 | unsigned int ier; |
2196 | int i; | ||
2197 | 2204 | ||
2198 | touch_nmi_watchdog(); | 2205 | touch_nmi_watchdog(); |
2199 | 2206 | ||
@@ -2207,22 +2214,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) | |||
2207 | else | 2214 | else |
2208 | serial_out(up, UART_IER, 0); | 2215 | serial_out(up, UART_IER, 0); |
2209 | 2216 | ||
2210 | /* | 2217 | uart_console_write(&up->port, s, count, serial8250_console_putchar); |
2211 | * Now, do each character | ||
2212 | */ | ||
2213 | for (i = 0; i < count; i++, s++) { | ||
2214 | wait_for_xmitr(up, UART_LSR_THRE); | ||
2215 | |||
2216 | /* | ||
2217 | * Send the character out. | ||
2218 | * If a LF, also do CR... | ||
2219 | */ | ||
2220 | serial_out(up, UART_TX, *s); | ||
2221 | if (*s == 10) { | ||
2222 | wait_for_xmitr(up, UART_LSR_THRE); | ||
2223 | serial_out(up, UART_TX, 13); | ||
2224 | } | ||
2225 | } | ||
2226 | 2218 | ||
2227 | /* | 2219 | /* |
2228 | * Finally, wait for transmitter to become empty | 2220 | * Finally, wait for transmitter to become empty |