[PATCH] serial: Set baudrate on boot

Sean Anderson seanga2 at gmail.com
Sun Feb 2 19:15:17 CET 2020

Currently, the baud rate is never set on boot. This works ok when a previous
bootloader has configured the baudrate properly, or when the baudrate is set to
a reasonable default in the serial driver's probe(). However, when this is not
the case, we could be using a different baud rate than what was configured.

Signed-off-by: Sean Anderson <seanga2 at gmail.com>
 drivers/serial/serial-uclass.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 0f5f1fa406..8aa542c32f 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -161,6 +161,7 @@ int serial_init(void)
 	gd->flags |= GD_FLG_SERIAL_READY;
+	serial_setbrg();
 	return 0;

More information about the U-Boot mailing list