[U-Boot] [PATCH 3/7] serial: serial_msm: initialize uart only before relocation
Simon Glass
sjg at chromium.org
Sun May 13 22:00:20 UTC 2018
On 12 May 2018 at 20:15, Ramon Fried <ramon.fried at gmail.com> wrote:
> The uart is already initialized prior to relocation,
> reinitialization after relocation is unnecessary.
>
> Signed-off-by: Ramon Fried <ramon.fried at gmail.com>
> ---
> drivers/serial/serial_msm.c | 4 ++++
> 1 file changed, 4 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
But please just use one set of brackets.
>
> diff --git a/drivers/serial/serial_msm.c b/drivers/serial/serial_msm.c
> index 250e48c996..22301c0e37 100644
> --- a/drivers/serial/serial_msm.c
> +++ b/drivers/serial/serial_msm.c
> @@ -183,6 +183,10 @@ static int msm_serial_probe(struct udevice *dev)
> {
> struct msm_serial_data *priv = dev_get_priv(dev);
>
> + /* No need to reinitialize the UART after relocation */
> + if ((gd->flags & GD_FLG_RELOC))
> + return 0;
> +
> if (msm_uart_clk_init(dev))
> return -EINVAL;
>
> --
> 2.14.1
>
More information about the U-Boot
mailing list