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

Ramon Fried ramon.fried at gmail.com
Wed May 16 09:13:38 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>
---
v2: removed extra parenthesis

 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 8b585deeeb..a4279accb4 100644
--- a/drivers/serial/serial_msm.c
+++ b/drivers/serial/serial_msm.c
@@ -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;
-- 
2.17.0



More information about the U-Boot mailing list