diff options
author | Ben Dooks <ben.dooks@codethink.co.uk> | 2015-11-18 09:41:18 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-13 22:59:48 -0500 |
commit | f1dd05c82985f9c476969598fd97cc680f18e86b (patch) | |
tree | 0b968c0fb50b6bb29a2112c8ab1768b641a82aa6 /drivers/tty | |
parent | 2561f068d91bbb1bd132b439c9023120c0b28cf4 (diff) |
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: Ben Dooks <ben.dooks@codethink.co.uk>
Tested-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/meson_uart.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index 12436cceebb7..6c365267e26a 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c | |||
@@ -144,6 +144,7 @@ static void meson_uart_start_tx(struct uart_port *port) | |||
144 | { | 144 | { |
145 | struct circ_buf *xmit = &port->state->xmit; | 145 | struct circ_buf *xmit = &port->state->xmit; |
146 | unsigned int ch; | 146 | unsigned int ch; |
147 | u32 val; | ||
147 | 148 | ||
148 | if (uart_tx_stopped(port)) { | 149 | if (uart_tx_stopped(port)) { |
149 | meson_uart_stop_tx(port); | 150 | meson_uart_stop_tx(port); |
@@ -167,6 +168,12 @@ static void meson_uart_start_tx(struct uart_port *port) | |||
167 | port->icount.tx++; | 168 | port->icount.tx++; |
168 | } | 169 | } |
169 | 170 | ||
171 | if (!uart_circ_empty(xmit)) { | ||
172 | val = readl(port->membase + AML_UART_CONTROL); | ||
173 | val |= AML_UART_TX_INT_EN; | ||
174 | writel(val, port->membase + AML_UART_CONTROL); | ||
175 | } | ||
176 | |||
170 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) | 177 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) |
171 | uart_write_wakeup(port); | 178 | uart_write_wakeup(port); |
172 | } | 179 | } |