Skip to content

Commit

Permalink
serial: mvebu-uart: add soft reset at probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Allen Yan authored and Greg Kroah-Hartman committed Oct 20, 2017
1 parent 5218d76 commit 9c3d3ee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/tty/serial/mvebu-uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9c3d3ee

Please sign in to comment.