Re: [PATCH 06/16] serial: mvebu-uart: add soft reset at probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Miquel,
 
 On ven., oct. 06 2017, Miquel Raynal <miquel.raynal@xxxxxxxxxxxxxxxxxx> wrote:

> From: Allen Yan <yanwei@xxxxxxxxxxx>
>
> 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@xxxxxxxxxxx>
> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxxxxxxxxx>

Reviewed-by: Gregory CLEMENT <gregory.clement@xxxxxxxxxxxxxxxxxx>

Thanks,

Gregory


> ---
>  drivers/tty/serial/mvebu-uart.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c
> index 82438884af1e..da756cfec0bb 100644
> --- a/drivers/tty/serial/mvebu-uart.c
> +++ b/drivers/tty/serial/mvebu-uart.c
> @@ -653,6 +653,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;
> -- 
> 2.11.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux