[U-Boot] [PATCH 3/7] serial: serial_msm: initialize uart only before relocation

Ramon Fried ramon.fried at gmail.com
Sat May 12 10:15:54 UTC 2018


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(+)

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