Skip to content

Commit

Permalink
serial/amba-pl011: Leave the TX IRQ alone when the UART is not open
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dave Martin authored and Greg Kroah-Hartman committed Mar 7, 2015
1 parent 734745c commit f2ee6df
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/tty/serial/amba-pl011.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit f2ee6df

Please sign in to comment.