08bd6a6f2d66ac79043edc1cab4b7c85fcd7d9a7
[15.05/openwrt.git] / target / linux / ar7 / patches-3.18 / 500-serial_kludge.patch
1 --- a/drivers/tty/serial/8250/8250_core.c
2 +++ b/drivers/tty/serial/8250/8250_core.c
3 @@ -329,6 +329,13 @@ static const struct serial8250_config ua
4                 .fcr            = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
5                 .flags          = UART_CAP_FIFO | UART_CAP_AFE,
6         },
7 +       [PORT_AR7] = {
8 +               .name           = "TI-AR7",
9 +               .fifo_size      = 16,
10 +               .tx_loadsz      = 16,
11 +               .fcr            = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_00,
12 +               .flags          = UART_CAP_FIFO | UART_CAP_AFE,
13 +       },
14  };
15  
16  /* Uart divisor latch read */
17 @@ -3174,7 +3181,11 @@ static void serial8250_console_putchar(s
18  {
19         struct uart_8250_port *up = up_to_u8250p(port);
20  
21 +#ifdef CONFIG_AR7
22 +       wait_for_xmitr(up, BOTH_EMPTY);
23 +#else
24         wait_for_xmitr(up, UART_LSR_THRE);
25 +#endif
26         serial_port_out(port, UART_TX, ch);
27  }
28