aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/21285.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/21285.c')
-rw-r--r--drivers/serial/21285.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c
index 8c5c276c5577..7572665a8855 100644
--- a/drivers/serial/21285.c
+++ b/drivers/serial/21285.c
@@ -375,23 +375,18 @@ static void serial21285_setup_ports(void)
375} 375}
376 376
377#ifdef CONFIG_SERIAL_21285_CONSOLE 377#ifdef CONFIG_SERIAL_21285_CONSOLE
378static void serial21285_console_putchar(struct uart_port *port, int ch)
379{
380 while (*CSR_UARTFLG & 0x20)
381 barrier();
382 *CSR_UARTDR = ch;
383}
378 384
379static void 385static void
380serial21285_console_write(struct console *co, const char *s, 386serial21285_console_write(struct console *co, const char *s,
381 unsigned int count) 387 unsigned int count)
382{ 388{
383 int i; 389 uart_console_write(&serial21285_port, s, count, serial21285_console_putchar);
384
385 for (i = 0; i < count; i++) {
386 while (*CSR_UARTFLG & 0x20)
387 barrier();
388 *CSR_UARTDR = s[i];
389 if (s[i] == '\n') {
390 while (*CSR_UARTFLG & 0x20)
391 barrier();
392 *CSR_UARTDR = '\r';
393 }
394 }
395} 390}
396 391
397static void __init 392static void __init