diff options
Diffstat (limited to 'drivers/tty/serial/8250/8250.c')
-rw-r--r-- | drivers/tty/serial/8250/8250.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c index d537431d7e2e..c5d550f28718 100644 --- a/drivers/tty/serial/8250/8250.c +++ b/drivers/tty/serial/8250/8250.c @@ -282,6 +282,12 @@ static const struct serial8250_config uart_config[] = { .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, .flags = UART_CAP_FIFO | UART_CAP_AFE | UART_CAP_EFR, }, + [PORT_BRCM_TRUMANAGE] = { + .name = "TruManage", + .fifo_size = 1, + .tx_loadsz = 1024, + .flags = UART_CAP_HFIFO, + }, }; #if defined(CONFIG_MIPS_ALCHEMY) @@ -1470,6 +1476,11 @@ void serial8250_tx_chars(struct uart_8250_port *up) port->icount.tx++; if (uart_circ_empty(xmit)) break; + if (up->capabilities & UART_CAP_HFIFO) { + if ((serial_port_in(port, UART_LSR) & BOTH_EMPTY) != + BOTH_EMPTY) + break; + } } while (--count > 0); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) @@ -2641,7 +2652,7 @@ serial8250_verify_port(struct uart_port *port, struct serial_struct *ser) if (ser->irq >= nr_irqs || ser->irq < 0 || ser->baud_base < 9600 || ser->type < PORT_UNKNOWN || ser->type >= ARRAY_SIZE(uart_config) || ser->type == PORT_CIRRUS || - ser->type == PORT_STARTECH) + ser->type == PORT_STARTECH || uart_config[ser->type].name == NULL) return -EINVAL; return 0; } @@ -2651,7 +2662,7 @@ serial8250_type(struct uart_port *port) { int type = port->type; - if (type >= ARRAY_SIZE(uart_config)) + if (type >= ARRAY_SIZE(uart_config) || uart_config[type].name == NULL) type = 0; return uart_config[type].name; } |