summaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2020-02-02 13:15:17 -0500
committerSimon Glass <sjg@chromium.org>2020-04-16 08:07:57 -0600
commitb41d4b83f0203be79a3bfa1e4bde316355c7f2a0 (patch)
tree98a60724a081f53f02770f5460193cc44e8ff7aa /drivers/serial
parent66b8669d7709cecedf2e0403bb17b48bab86f644 (diff)
serial: Set baudrate on boot
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@gmail.com>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/serial-uclass.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 30f9b8c939..7703c67492 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -162,6 +162,7 @@ int serial_init(void)
#if CONFIG_IS_ENABLED(SERIAL_PRESENT)
serial_find_console_or_panic();
gd->flags |= GD_FLG_SERIAL_READY;
+ serial_setbrg();
#endif
return 0;