[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>
This commit is contained in:
committed by
Russell King
parent
7705a8792b
commit
d358788f3f
@@ -603,15 +603,14 @@ mpc52xx_console_write(struct console *co, const char *s, unsigned int count)
|
||||
udelay(1);
|
||||
|
||||
/* Write all the chars */
|
||||
for ( i=0 ; i<count ; i++ ) {
|
||||
|
||||
for (i = 0; i < count; i++, s++) {
|
||||
/* Line return handling */
|
||||
if (*s == '\n')
|
||||
out_8(&psc->mpc52xx_psc_buffer_8, '\r');
|
||||
|
||||
/* Send the char */
|
||||
out_8(&psc->mpc52xx_psc_buffer_8, *s);
|
||||
|
||||
/* Line return handling */
|
||||
if ( *s++ == '\n' )
|
||||
out_8(&psc->mpc52xx_psc_buffer_8, '\r');
|
||||
|
||||
/* Wait the TX buffer to be empty */
|
||||
j = 20000; /* Maximum wait */
|
||||
while (!(in_be16(&psc->mpc52xx_psc_status) &
|
||||
|
Reference in New Issue
Block a user