mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-02 00:24:40 +02:00
ee7bcf1bc1
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16680 3c298f89-4303-0410-b956-a3cf2f4a3e73
39 lines
1.0 KiB
Diff
39 lines
1.0 KiB
Diff
--- 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
|