summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDave Martin <Dave.Martin@arm.com>2015-03-04 15:27:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-07 05:48:50 +0300
commitf2ee6dfa0e8597eea8b98d240b0033994e20d215 (patch)
treeb430ce4711f1ec4f3bbdf828ace890810672c12f /drivers
parent734745caeb9f155ab58918834a8c70e83fa6afd3 (diff)
downloadlinux-f2ee6dfa0e8597eea8b98d240b0033994e20d215.tar.xz
serial/amba-pl011: Leave the TX IRQ alone when the UART is not open
Getting the TX IRQ re-asserted from scratch can be inefficient in some setups. This patch avoids clearing the TX IRQ across pl011_shutdown()... pl011_startup(), so that if the port is closed and reopened, the IRQ will still work afterwards without having to bootstrap it again. The TX IRQ continues to be masked in IMSC when the UART is not in use. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Tested-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/amba-pl011.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 69910f7e3991..92783fc8a851 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1676,9 +1676,6 @@ static int pl011_startup(struct uart_port *port)
writew(uap->vendor->ifls, uap->port.membase + UART011_IFLS);
- /* Assume that TX IRQ doesn't work until we see one: */
- uap->tx_irq_seen = 0;
-
spin_lock_irq(&uap->port.lock);
/* restore RTS and DTR */
@@ -1742,7 +1739,7 @@ static void pl011_shutdown(struct uart_port *port)
spin_lock_irq(&uap->port.lock);
uap->im = 0;
writew(uap->im, uap->port.membase + UART011_IMSC);
- writew(0xffff, uap->port.membase + UART011_ICR);
+ writew(0xffff & ~UART011_TXIS, uap->port.membase + UART011_ICR);
spin_unlock_irq(&uap->port.lock);
pl011_dma_shutdown(uap);