aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorAllen Yan <yanwei@marvell.com>2017-10-13 11:01:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-20 14:20:06 +0200
commit9c3d3ee1239bab92d509f334530796d0ced4ca98 (patch)
treec849e6524226cdc8d6e5eee1283ba892d9aa0e6d /drivers/tty
parentserial: mvebu-uart: use a generic way to access the registers (diff)
downloadlinux-dev-9c3d3ee1239bab92d509f334530796d0ced4ca98.tar.xz
linux-dev-9c3d3ee1239bab92d509f334530796d0ced4ca98.zip
serial: mvebu-uart: add soft reset at probe
The existing UART driver relies on the bootloader to initialize the port(s). However, the secondary uart port may not be initialized properly in early boot stage. This patch adds the UART soft reset when probing, for all ports. Signed-off-by: Allen Yan <yanwei@marvell.com> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com> Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/mvebu-uart.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c
index 900fe85796d6..e233f464d55a 100644
--- a/drivers/tty/serial/mvebu-uart.c
+++ b/drivers/tty/serial/mvebu-uart.c
@@ -660,6 +660,11 @@ static int mvebu_uart_probe(struct platform_device *pdev)
port->private_data = mvuart;
platform_set_drvdata(pdev, mvuart);
+ /* UART Soft Reset*/
+ writel(CTRL_SOFT_RST, port->membase + UART_CTRL(port));
+ udelay(1);
+ writel(0, port->membase + UART_CTRL(port));
+
ret = uart_add_one_port(&mvebu_uart_driver, port);
if (ret)
return ret;