Furquan Shaikh has uploaded this change for review.

View Change

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
---
M src/drivers/uart/util.c
1 file changed, 5 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/20834/1
diff --git a/src/drivers/uart/util.c b/src/drivers/uart/util.c
index f0f885d..4f31261 100644
--- a/src/drivers/uart/util.c
+++ b/src/drivers/uart/util.c
@@ -33,7 +33,11 @@
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 : 115200;
}

/* Calculate divisor. Do not floor but round to nearest integer. */

To view, visit change 20834. To unsubscribe, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida4c7ae77aba5dfd4ec331e22a54ce43a91bde00
Gerrit-Change-Number: 20834
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan@google.com>