sc114: fix console blocking
authorAlan Cox <alan@linux.intel.com>
Sat, 19 Jan 2019 21:32:30 +0000 (21:32 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 19 Jan 2019 21:32:30 +0000 (21:32 +0000)
Kernel/platform-sc114/devtty.c

index 69b299c..58c8422 100644 (file)
@@ -127,7 +127,9 @@ void tty_data_consumed(uint8_t minor)
 /* kernel writes to system console -- never sleep! */
 void kputchar(char c)
 {
-       tty_putc(TTYDEV - 512, c);
+       while(tty_writeready(TTYDEV - 512) != TTY_READY_NOW);
        if (c == '\n')
                tty_putc(TTYDEV - 512, '\r');
+       while(tty_writeready(TTYDEV - 512) != TTY_READY_NOW);
+       tty_putc(TTYDEV - 512, c);
 }