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>
This commit is contained in:
parent
919923def3
commit
c5332e30da
2 changed files with 2 additions and 4 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue