serial: Set baudrate on boot
PATCH 1/1 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.
--- drivers/serial/serial-uclass.c | 1 + 1 file changed, 1 insertion(+)
drivers/serial/serial-uclass.c +1 -0
@@ -161,6 +161,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 ;
Signature · 1 line
2.25.0
PATCH 1/1 serial: Set baudrate on boot
Hi Sean,
Quoted 10 lines · Sean Anderson
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 <[email protected]>--- drivers/serial/serial-uclass.c | 1 + 1 file changed, 1 insertion(+)
This looks right to me.
Can you please update the docs for setbrg() in serial.h to mention that this method is always called after probing, so there is now no need to set the baud rate in the probe() method?
PATCH 1/1 serial: Set baudrate on boot
Quoted 6 lines
This looks right to me.
Can you please update the docs for
setbrg()inserial.hto mention that this method is always called after probing, so there is now no need to set the baud rate in theprobe()method?
Sure. Will do that in v2.
PATCH 1/1 serial: Set baudrate on boot
Quoted 6 lines
This looks right to me.
Can you please update the docs for
setbrg()inserial.hto mention that this method is always called after probing, so there is now no need to set the baud rate in theprobe()method?
Sure. Will do that in v2.
Applied to u-boot-dm, thanks!