You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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
+7
-12
@@ -375,23 +375,18 @@ static void serial21285_setup_ports(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SERIAL_21285_CONSOLE
|
||||
static void serial21285_console_putchar(struct uart_port *port, int ch)
|
||||
{
|
||||
while (*CSR_UARTFLG & 0x20)
|
||||
barrier();
|
||||
*CSR_UARTDR = ch;
|
||||
}
|
||||
|
||||
static void
|
||||
serial21285_console_write(struct console *co, const char *s,
|
||||
unsigned int count)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
while (*CSR_UARTFLG & 0x20)
|
||||
barrier();
|
||||
*CSR_UARTDR = s[i];
|
||||
if (s[i] == '\n') {
|
||||
while (*CSR_UARTFLG & 0x20)
|
||||
barrier();
|
||||
*CSR_UARTDR = '\r';
|
||||
}
|
||||
}
|
||||
uart_console_write(&serial21285_port, s, count, serial21285_console_putchar);
|
||||
}
|
||||
|
||||
static void __init
|
||||
|
||||
Reference in New Issue
Block a user