Skip to content

Commit 9c3d3ee

Browse files
Allen Yangregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Gregory CLEMENT <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5218d76 commit 9c3d3ee

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/tty/serial/mvebu-uart.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,11 @@ static int mvebu_uart_probe(struct platform_device *pdev)
660660
port->private_data = mvuart;
661661
platform_set_drvdata(pdev, mvuart);
662662

663+
/* UART Soft Reset*/
664+
writel(CTRL_SOFT_RST, port->membase + UART_CTRL(port));
665+
udelay(1);
666+
writel(0, port->membase + UART_CTRL(port));
667+
663668
ret = uart_add_one_port(&mvebu_uart_driver, port);
664669
if (ret)
665670
return ret;

0 commit comments

Comments
 (0)