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

ARM: meson: serial: check for tx-irq enabled in irq code

Ensure that if the interrupt handler is entered then only try and do tx
work if the tx irq is enabled.
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 f1dd05c8
...@@ -237,8 +237,10 @@ static irqreturn_t meson_uart_interrupt(int irq, void *dev_id) ...@@ -237,8 +237,10 @@ static irqreturn_t meson_uart_interrupt(int irq, void *dev_id)
if (!(readl(port->membase + AML_UART_STATUS) & AML_UART_RX_EMPTY)) if (!(readl(port->membase + AML_UART_STATUS) & AML_UART_RX_EMPTY))
meson_receive_chars(port); meson_receive_chars(port);
if (!(readl(port->membase + AML_UART_STATUS) & AML_UART_TX_FULL)) if (!(readl(port->membase + AML_UART_STATUS) & AML_UART_TX_FULL)) {
if (readl(port->membase + AML_UART_CONTROL) & AML_UART_TX_INT_EN)
meson_uart_start_tx(port); meson_uart_start_tx(port);
}
spin_unlock(&port->lock); spin_unlock(&port->lock);
......
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