aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2015-11-18 09:41:17 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-13 22:59:48 -0500
commit2561f068d91bbb1bd132b439c9023120c0b28cf4 (patch)
treebc050ee37e7a2ca69dfea94ee69b5aaf22e36978 /drivers/tty
parentf1f5c1400f7907a1b52be94cabe8992b480785cf (diff)
ARM: meson: serial: disable rx/tx irqs during console write
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> Tested-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/meson_uart.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index d3f2c967906c..12436cceebb7 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,
472 struct uart_port *port; 472 struct uart_port *port;
473 unsigned long flags; 473 unsigned long flags;
474 int locked; 474 int locked;
475 u32 val; 475 u32 val, tmp;
476 476
477 port = meson_ports[co->index]; 477 port = meson_ports[co->index];
478 if (!port) 478 if (!port)
@@ -489,9 +489,12 @@ static void meson_serial_console_write(struct console *co, const char *s,
489 } 489 }
490 490
491 val = readl(port->membase + AML_UART_CONTROL); 491 val = readl(port->membase + AML_UART_CONTROL);
492 writel(val | AML_UART_TX_EN, port->membase + AML_UART_CONTROL); 492 val |= AML_UART_TX_EN;
493 tmp = val & ~(AML_UART_TX_INT_EN | AML_UART_RX_INT_EN);
494 writel(tmp, port->membase + AML_UART_CONTROL);
493 495
494 uart_console_write(port, s, count, meson_console_putchar); 496 uart_console_write(port, s, count, meson_console_putchar);
497 writel(val, port->membase + AML_UART_CONTROL);
495 498
496 if (locked) 499 if (locked)
497 spin_unlock(&port->lock); 500 spin_unlock(&port->lock);