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 7/9] ARM: meson: serial: disable rx/tx irqs during console write
Date: Wed, 18 Nov 2015 14:41:17 +0000 [thread overview]
Message-ID: <1447857679-30158-8-git-send-email-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <1447857679-30158-1-git-send-email-ben.dooks@codethink.co.uk>
As an attempt to stop issues with bad console output, ensure that both the
rx and tx interrupts are disabled during the console write to avoid any
problems with console and non-console being called together.
This should help with the SMP case as it should stop other cores being
signalled during the console write.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
drivers/tty/serial/meson_uart.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index d3f2c96..12436cc 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -472,7 +472,7 @@ static void meson_serial_console_write(struct console *co, const char *s,
struct uart_port *port;
unsigned long flags;
int locked;
- u32 val;
+ u32 val, tmp;
port = meson_ports[co->index];
if (!port)
@@ -489,9 +489,12 @@ static void meson_serial_console_write(struct console *co, const char *s,
}
val = readl(port->membase + AML_UART_CONTROL);
- writel(val | AML_UART_TX_EN, port->membase + AML_UART_CONTROL);
+ val |= AML_UART_TX_EN;
+ tmp = val & ~(AML_UART_TX_INT_EN | AML_UART_RX_INT_EN);
+ writel(tmp, port->membase + AML_UART_CONTROL);
uart_console_write(port, s, count, meson_console_putchar);
+ writel(val, port->membase + AML_UART_CONTROL);
if (locked)
spin_unlock(&port->lock);
--
2.6.2
next prev 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 ` Ben Dooks [this message]
2015-11-18 14:41 ` [PATCH 8/9] ARM: meson: serial: ensure tx irq on if more work to do Ben Dooks
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-8-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).