linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: edward.cragg@codethink.co.uk
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-meson@googlegroups.com, linux-kernel@codethink.co.uk,
	Ben Dooks <ben.dooks@codethink.co.uk>,
	linux-serial@vger.kernel.org, Jiri Slaby <jslaby@suse.com>,
	carlo@caione.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 8/9] ARM: meson: serial: ensure tx irq on if more work to do
Date: Wed, 18 Nov 2015 14:41:18 +0000	[thread overview]
Message-ID: <1447857679-30158-9-git-send-email-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <1447857679-30158-1-git-send-email-ben.dooks@codethink.co.uk>

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>
---
 drivers/tty/serial/meson_uart.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index 12436cc..6c36526 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)
 {
 	struct circ_buf *xmit = &port->state->xmit;
 	unsigned int ch;
+	u32 val;
 
 	if (uart_tx_stopped(port)) {
 		meson_uart_stop_tx(port);
@@ -167,6 +168,12 @@ static void meson_uart_start_tx(struct uart_port *port)
 		port->icount.tx++;
 	}
 
+	if (!uart_circ_empty(xmit)) {
+		val = readl(port->membase + AML_UART_CONTROL);
+		val |= AML_UART_TX_INT_EN;
+		writel(val, port->membase + AML_UART_CONTROL);
+	}
+
 	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
 		uart_write_wakeup(port);
 }
-- 
2.6.2

  parent reply	other threads:[~2015-11-18 14:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 14:41 AMLogic Meson serial driver fixes Ben Dooks
2015-11-18 14:41 ` [PATCH 1/9] ARM: meson: serial: release region on port release Ben Dooks
2015-11-18 14:41 ` [PATCH 2/9] ARM: meson: serial: don't reset port on uart startup Ben Dooks
2015-11-18 14:41 ` [PATCH 3/9] ARM: meson: serial: tx_empty fails to check for transmitter busy Ben Dooks
2015-11-18 14:41 ` [PATCH 4/9] ARM: meson: serial: ensure console port uart enabled Ben Dooks
2015-11-18 14:41 ` [PATCH 5/9] ARM: meson: serial: only disable tx irq on stop Ben Dooks
2015-11-18 14:41 ` [PATCH 6/9] ARM: meson: serial: use meson_uart_tx_empty() to wait for empty Ben Dooks
2015-11-18 14:41 ` [PATCH 7/9] ARM: meson: serial: disable rx/tx irqs during console write Ben Dooks
2015-11-18 14:41 ` Ben Dooks [this message]
2015-11-18 14:41 ` [PATCH 9/9] ARM: meson: serial: check for tx-irq enabled in irq code Ben Dooks
2015-11-23 11:52 ` [linux-meson] AMLogic Meson serial driver fixes Carlo Caione

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=1447857679-30158-9-git-send-email-ben.dooks@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=carlo@caione.org \
    --cc=edward.cragg@codethink.co.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@codethink.co.uk \
    --cc=linux-meson@googlegroups.com \
    --cc=linux-serial@vger.kernel.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).