drivers/uart: Use baudrate of 115200 by default
If TTYS0_BAUD is not configured, then by default use baudrate of 115200. BUG=b:64030366 Change-Id: Ida4c7ae77aba5dfd4ec331e22a54ce43a91bde00 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/20834 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
c4f60f33bd
commit
1679c42292
|
@ -18,6 +18,8 @@
|
|||
#include "option_table.h"
|
||||
#endif
|
||||
|
||||
#define DEFAULT_BAUDRATE 115200
|
||||
|
||||
unsigned int default_baudrate(void)
|
||||
{
|
||||
#if !defined(__SMM__) && IS_ENABLED(CONFIG_USE_OPTION_TABLE)
|
||||
|
@ -33,7 +35,11 @@ unsigned int default_baudrate(void)
|
|||
if (b_index < 8)
|
||||
return baud[b_index];
|
||||
#endif
|
||||
return CONFIG_TTYS0_BAUD;
|
||||
/*
|
||||
* If TTYS0_BAUD is not configured, then by default use 115200 as the
|
||||
* baud rate.
|
||||
*/
|
||||
return CONFIG_TTYS0_BAUD ? CONFIG_TTYS0_BAUD : DEFAULT_BAUDRATE;
|
||||
}
|
||||
|
||||
/* Calculate divisor. Do not floor but round to nearest integer. */
|
||||
|
|
Loading…
Reference in New Issue