[coreboot-gerrit] New patch to review for coreboot: soc/samsung/exynos5420/uart.c: Init new serial struct variables
Martin Roth (martinroth@google.com)
gerrit at coreboot.org
Fri Nov 18 20:25:46 CET 2016
Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17482
-gerrit
commit c5ceeb8545ab01134dbc3995805252cbb5038a6c
Author: Martin Roth <martinroth at google.com>
Date: Fri Nov 18 10:34:24 2016 -0700
soc/samsung/exynos5420/uart.c: Init new serial struct variables
The lb_serial structure had some new entries added, which were not being
filled in.
Fill in the values so they're not undefined.
Addresses coverity error 1354778 - Uninitialized scalar variable
Change-Id: Ia7ce07f6e4e058c91c2e063f3225497271ef93ff
Signed-off-by: Martin Roth <martinroth at google.com>
---
src/soc/samsung/exynos5420/uart.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/soc/samsung/exynos5420/uart.c b/src/soc/samsung/exynos5420/uart.c
index 00ed432..d846b2a 100644
--- a/src/soc/samsung/exynos5420/uart.c
+++ b/src/soc/samsung/exynos5420/uart.c
@@ -176,6 +176,11 @@ void uart_tx_flush(int idx)
/* Exynos5250 implements this too. */
}
+unsigned int uart_platform_refclk(void)
+{
+ return clock_get_periph_rate(PERIPH_ID_UART3);
+}
+
#ifndef __PRE_RAM__
void uart_fill_lb(void *data)
{
@@ -184,6 +189,8 @@ void uart_fill_lb(void *data)
serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
serial.baud = default_baudrate();
serial.regwidth = 4;
+ serial.input_hertz = uart_platform_refclk();
+ serial.uart_pci_addr = CONFIG_UART_PCI_ADDR;
lb_add_serial(&serial, data);
lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
More information about the coreboot-gerrit
mailing list