diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2011-06-16 13:27:07 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:29 -0700 |
commit | ee8eb6e15d3aad43744b68661bed4c2f22d26fb5 (patch) | |
tree | a8a7f5136835c29def5db1e3fb54d3cb3d496994 /board | |
parent | 889f8e96da85483ffb140caa5120e1c556e7b5ac (diff) |
Initialize UART on Kaen properly.
Change supplied by sgj@chromium.org.
BUG=chromium-os:834
TEST=manual
Tested combined with other commits of this series.
Change-Id: I59a3074135e9d16c12bafe0adb8c0d5cde0d6dea
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/2774
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/nvidia/common/board.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c index e296a714dd2..801b6807d3b 100644 --- a/board/nvidia/common/board.c +++ b/board/nvidia/common/board.c @@ -62,6 +62,7 @@ const struct tegra2_sysinfo sysinfo = { enum { /* UARTs which we can enable */ UARTA = 1 << 0, + UARTB = 1 << 1, UARTD = 1 << 3, }; @@ -80,7 +81,7 @@ static void enable_uart(enum periph_id pid) /* Assert UART reset and enable clock */ reset_set_enable(pid, 1); clock_enable(pid); - clock_ll_set_source(pid, 0); /* UARTA_CLK_SRC = 00, PLLP_OUT0 */ + clock_ll_set_source(pid, 0); /* UARTx_CLK_SRC = 00, PLLP_OUT0 */ /* wait for 2us */ udelay(2); @@ -116,6 +117,8 @@ static void clock_init_uart(int uart_ids) if (uart_ids & UARTA) enable_uart(PERIPH_ID_UART1); + if (uart_ids & UARTB) + enable_uart(PERIPH_ID_UART2); if (uart_ids & UARTD) enable_uart(PERIPH_ID_UART4); } @@ -132,6 +135,10 @@ static void pin_mux_uart(int uart_ids) pinmux_tristate_disable(PINGRP_IRRX); pinmux_tristate_disable(PINGRP_IRTX); } + if (uart_ids & UARTB) { + pinmux_set_func(PINGRP_UAD, PMUX_FUNC_IRDA); + pinmux_tristate_disable(PINGRP_UAD); + } if (uart_ids & UARTD) { pinmux_set_func(PINGRP_GMC, PMUX_FUNC_UARTD); pinmux_tristate_disable(PINGRP_GMC); @@ -255,6 +262,9 @@ int board_early_init_f(void) #ifdef CONFIG_TEGRA2_ENABLE_UARTA uart_ids |= UARTA; #endif +#ifdef CONFIG_TEGRA2_ENABLE_UARTB + uart_ids |= UARTB; +#endif #ifdef CONFIG_TEGRA2_ENABLE_UARTD uart_ids |= UARTD; #endif |