From: Allen Yan Date: Fri, 13 Oct 2017 09:01:50 +0000 (+0200) Subject: serial: mvebu-uart: add soft reset at probe X-Git-Tag: v4.15-rc1~141^2~49 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=9c3d3ee1239bab92d509f334530796d0ced4ca98;p=linux.git 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 Signed-off-by: Miquel Raynal Reviewed-by: Gregory CLEMENT Signed-off-by: Greg Kroah-Hartman --- 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;