Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5288
-gerrit
commit b14343f02618778defda9b94e8276648525a0b69 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Wed Feb 19 08:58:12 2014 +0200
samsung/exynos5: Fix baudrate calculation
Account for possible use of get_option() when baudrate is no longer compile-time constant.
Change-Id: Ib45acd98e55c5892dbce9903830665aefeda5be0 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/cpu/samsung/exynos5250/uart.c | 3 +-- src/cpu/samsung/exynos5420/uart.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/cpu/samsung/exynos5250/uart.c b/src/cpu/samsung/exynos5250/uart.c index dbf7202..10108a8 100644 --- a/src/cpu/samsung/exynos5250/uart.c +++ b/src/cpu/samsung/exynos5250/uart.c @@ -63,12 +63,11 @@ static void serial_setbrg_dev(void) { struct s5p_uart *uart = (struct s5p_uart *)base_port; u32 uclk; - u32 baudrate = CONFIG_TTYS0_BAUD; u32 val;
// All UARTs share the same clock. uclk = clock_get_periph_rate(PERIPH_ID_UART3); - val = uclk / baudrate; + val = uclk / default_baudrate();
writel(val / 16 - 1, &uart->ubrdiv);
diff --git a/src/cpu/samsung/exynos5420/uart.c b/src/cpu/samsung/exynos5420/uart.c index c5c8a8c..2ca8271 100644 --- a/src/cpu/samsung/exynos5420/uart.c +++ b/src/cpu/samsung/exynos5420/uart.c @@ -63,12 +63,11 @@ static void serial_setbrg_dev(void) { struct s5p_uart *uart = (struct s5p_uart *)base_port; u32 uclk; - u32 baudrate = CONFIG_TTYS0_BAUD; u32 val;
// All UARTs share the same clock. uclk = clock_get_periph_rate(PERIPH_ID_UART3); - val = uclk / baudrate; + val = uclk / default_baudrate();
writel(val / 16 - 1, &uart->ubrdiv);