提交 9c3d3ee1 编写于 作者: A Allen Yan 提交者: Greg Kroah-Hartman

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: NAllen Yan <yanwei@marvell.com>
Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com>
Reviewed-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5218d769
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册