summaryrefslogtreecommitdiff
path: root/src/cpu/samsung/exynos5250
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-02-19 08:58:12 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-03-04 15:24:10 +0100
commitc5332e30da4c314c1d44d6d3f9df6d2ae6417e0f (patch)
tree9e41590c4c1468ab8faaf55b257c9d324196138d /src/cpu/samsung/exynos5250
parent919923def3d76a95665c60e7ff3dd033c2d65d84 (diff)
downloadcoreboot-c5332e30da4c314c1d44d6d3f9df6d2ae6417e0f.tar.xz
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> Reviewed-on: http://review.coreboot.org/5288 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/cpu/samsung/exynos5250')
-rw-r--r--src/cpu/samsung/exynos5250/uart.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cpu/samsung/exynos5250/uart.c b/src/cpu/samsung/exynos5250/uart.c
index dbf7202d35..10108a8139 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);