From: Dave.Martin@arm.com (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] serial/amba-pl011: Leave the TX IRQ alone when the UART is not open
Date: Fri, 13 Mar 2015 15:56:22 +0000 [thread overview]
Message-ID: <1426262182-2298-3-git-send-email-Dave.Martin@arm.com> (raw)
In-Reply-To: <1426262182-2298-1-git-send-email-Dave.Martin@arm.com>
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>
---
drivers/tty/serial/amba-pl011.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index bdb4831..c3d631d 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1646,9 +1646,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 = false;
-
spin_lock_irq(&uap->port.lock);
/* restore RTS and DTR */
@@ -1712,7 +1709,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);
--
1.7.10.4
next prev parent reply other threads:[~2015-03-13 15:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 15:56 [PATCH v2 0/2] serial/amba-pl011: Activate TX IRQ passively Dave Martin
2015-03-13 15:56 ` [PATCH v2 1/2] " Dave Martin
2015-03-26 21:27 ` Greg Kroah-Hartman
2015-03-13 15:56 ` Dave Martin [this message]
2015-03-26 21:26 ` [PATCH v2 2/2] serial/amba-pl011: Leave the TX IRQ alone when the UART is not open Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426262182-2298-3-git-send-email-Dave.Martin@arm.com \
--to=dave.martin@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).