From d1c13ff9ffcfca5288af1645a3b107aeba5f4efd Mon Sep 17 00:00:00 2001 From: Mike Westerhof Date: Wed, 19 Nov 2008 17:10:47 +0000 Subject: silence-serial-console-gta01.patch This patch ensures that no console data will go the UART while the GSM mux is switched to the GSM. This is necessary despite the code that disables the console due to the fact that the console resumes before the neo1973_pm_gsm driver, and consoles always resume in the "on" state. Signed-off-by: Mike Westerhof --- drivers/serial/s3c2410.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/serial') diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c index fef212c86d9..80c901c61c2 100644 --- a/drivers/serial/s3c2410.c +++ b/drivers/serial/s3c2410.c @@ -1716,6 +1716,13 @@ module_exit(s3c24xx_serial_modexit); #ifdef CONFIG_SERIAL_S3C2410_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) @@ -1742,6 +1749,9 @@ 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)); -- cgit v1.2.3