]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
serial: serial_msm: initialize uart only before relocation
authorRamon Fried <ramon.fried@gmail.com>
Wed, 16 May 2018 09:13:38 +0000 (12:13 +0300)
committerTom Rini <trini@konsulko.com>
Sat, 26 May 2018 16:46:50 +0000 (12:46 -0400)
The uart is already initialized prior to relocation,
reinitialization after relocation is unnecessary.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/serial/serial_msm.c

index 8b585deeeb537587c00f1f48543989d68895f64d..a4279accb4f7ffa8d75a35d179ad7f7d777fa72a 100644 (file)
@@ -184,6 +184,10 @@ static int msm_serial_probe(struct udevice *dev)
        int ret;
        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;
+
        ret = msm_uart_clk_init(dev);
        if (ret)
                return ret;