Commit f1dd05c8 authored by Ben Dooks's avatar Ben Dooks Committed by Greg Kroah-Hartman

ARM: meson: serial: ensure tx irq on if more work to do

The tx_stop() call turns the interrupt off, but the tx_start() does not
check if the interrupt is enabled. Switch it back on if there is more
work to do.
Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
Tested-by: default avatarCarlo Caione <carlo@endlessm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2561f068
...@@ -144,6 +144,7 @@ static void meson_uart_start_tx(struct uart_port *port) ...@@ -144,6 +144,7 @@ static void meson_uart_start_tx(struct uart_port *port)
{ {
struct circ_buf *xmit = &port->state->xmit; struct circ_buf *xmit = &port->state->xmit;
unsigned int ch; unsigned int ch;
u32 val;
if (uart_tx_stopped(port)) { if (uart_tx_stopped(port)) {
meson_uart_stop_tx(port); meson_uart_stop_tx(port);
...@@ -167,6 +168,12 @@ static void meson_uart_start_tx(struct uart_port *port) ...@@ -167,6 +168,12 @@ static void meson_uart_start_tx(struct uart_port *port)
port->icount.tx++; port->icount.tx++;
} }
if (!uart_circ_empty(xmit)) {
val = readl(port->membase + AML_UART_CONTROL);
val |= AML_UART_TX_INT_EN;
writel(val, port->membase + AML_UART_CONTROL);
}
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_write_wakeup(port); uart_write_wakeup(port);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment