ixp4xx: add Mikael Petterssons patch works for 2.6.33 & 2.6.35
[openwrt.git] / target / linux / s3c24xx / patches-2.6.30 / 110-serial.patch
1 --- a/drivers/serial/samsung.c
2 +++ b/drivers/serial/samsung.c
3 @@ -1263,6 +1263,13 @@ module_exit(s3c24xx_serial_modexit);
4 #ifdef CONFIG_SERIAL_SAMSUNG_CONSOLE
5
6 static struct uart_port *cons_uart;
7 +static int cons_silenced;
8 +
9 +void s3c24xx_serial_console_set_silence(int silenced)
10 +{
11 + cons_silenced = silenced;
12 +}
13 +EXPORT_SYMBOL(s3c24xx_serial_console_set_silence);
14
15 static int
16 s3c24xx_serial_console_txrdy(struct uart_port *port, unsigned int ufcon)
17 @@ -1287,9 +1294,21 @@ static void
18 s3c24xx_serial_console_putchar(struct uart_port *port, int ch)
19 {
20 unsigned int ufcon = rd_regl(cons_uart, S3C2410_UFCON);
21 + unsigned int umcon = rd_regl(cons_uart, S3C2410_UMCON);
22 +
23 + if (cons_silenced)
24 + return;
25 +
26 + /* If auto HW flow control enabled, temporarily turn it off */
27 + if (umcon & S3C2410_UMCOM_AFC)
28 + wr_regl(port, S3C2410_UMCON, (umcon & !S3C2410_UMCOM_AFC));
29 +
30 while (!s3c24xx_serial_console_txrdy(port, ufcon))
31 barrier();
32 wr_regb(cons_uart, S3C2410_UTXH, ch);
33 +
34 + if (umcon & S3C2410_UMCOM_AFC)
35 + wr_regl(port, S3C2410_UMCON, umcon);
36 }
37
38 static void
This page took 0.05305 seconds and 5 git commands to generate.