static void s3c_serial_console_putchar(struct uart_port *port, int ch) { unsigned int ufcon = rd_regl(cons_uart, S3C_UFCON); while (!s3c_serial_console_txrdy(port, ufcon)) barrier(); wr_regb(cons_uart, S3C_UTXH, ch); }
static void s3c_serial_console_write(struct console *co, const char *s, unsigned int count) { int i; unsigned int ufcon = rd_regl(cons_uart, S3C_UFCON); for (i = 0; i < count; i++) { while (!s3c_serial_console_txrdy(cons_uart, ufcon)) barrier(); wr_regb(cons_uart, S3C_UTXH, s[i]); if (s[i] == '\n') { while (!s3c_serial_console_txrdy(cons_uart, ufcon)) barrier(); wr_regb(cons_uart, S3C_UTXH, '\r'); } } }