[U-Boot] [PATCH 2/2] imx: serial_mxc: skip uart initilization

Jun Nie jun.nie at linaro.org
Fri Mar 22 07:20:04 UTC 2019


Skip uart initilization if CONFIG_UART_SKIP_INIT is defined.
That's means earlier firmware already initialized the uart.

Signed-off-by: Jun Nie <jun.nie at linaro.org>
---
 drivers/serial/serial_mxc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index 476df25..01c97a4 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -231,9 +231,11 @@ static int mxc_serial_tstc(void)
  */
 static int mxc_serial_init(void)
 {
+#ifndef CONFIG_UART_SKIP_INIT
 	_mxc_serial_init(mxc_base, false);
 
 	serial_setbrg();
+#endif
 
 	return 0;
 }
@@ -276,7 +278,9 @@ static int mxc_serial_probe(struct udevice *dev)
 {
 	struct mxc_serial_platdata *plat = dev->platdata;
 
+#ifndef CONFIG_UART_SKIP_INIT
 	_mxc_serial_init(plat->reg, plat->use_dte);
+#endif
 
 	return 0;
 }
-- 
2.7.4



More information about the U-Boot mailing list