diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2009-10-05 14:27:40 +0200 |
---|---|---|
committer | Lars-Peter Clausen <lars@metafoo.de> | 2009-12-06 10:16:46 +0100 |
commit | 443bc0df36623de29eb9048685343cdf68d0e206 (patch) | |
tree | 208893a283637be00f0826677aaba66ffcb1d74a /drivers/serial | |
parent | 23dcc9ef00892b278560cacf045b8d8b260a2582 (diff) |
Add s3c24xx_serial_console_set_silence
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/samsung.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c index 1523e8d9ae7..e0062b5626c 100644 --- a/drivers/serial/samsung.c +++ b/drivers/serial/samsung.c @@ -1263,6 +1263,13 @@ module_exit(s3c24xx_serial_modexit); #ifdef CONFIG_SERIAL_SAMSUNG_CONSOLE static struct uart_port *cons_uart; +static int cons_silenced; + +void s3c24xx_serial_console_set_silence(int silenced) +{ + cons_silenced = silenced; +} +EXPORT_SYMBOL(s3c24xx_serial_console_set_silence); static int s3c24xx_serial_console_txrdy(struct uart_port *port, unsigned int ufcon) @@ -1287,9 +1294,21 @@ static void s3c24xx_serial_console_putchar(struct uart_port *port, int ch) { unsigned int ufcon = rd_regl(cons_uart, S3C2410_UFCON); + unsigned int umcon = rd_regl(cons_uart, S3C2410_UMCON); + + if (cons_silenced) + return; + + /* If auto HW flow control enabled, temporarily turn it off */ + if (umcon & S3C2410_UMCOM_AFC) + wr_regl(port, S3C2410_UMCON, (umcon & !S3C2410_UMCOM_AFC)); + while (!s3c24xx_serial_console_txrdy(port, ufcon)) barrier(); wr_regb(cons_uart, S3C2410_UTXH, ch); + + if (umcon & S3C2410_UMCOM_AFC) + wr_regl(port, S3C2410_UMCON, umcon); } static void |