summaryrefslogtreecommitdiffstats
path: root/board/nvidia/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-11-05 04:46:45 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-12-24 10:23:30 +0100
commit1be0d75973eff5a7655f8eb5241661767b97ffd3 (patch)
tree48192fcdb764f48094732b807edada5909b2816d /board/nvidia/common
parent6b5763e5886c0c5aaef36eab7d660fc885b60c20 (diff)
downloadtalos-obmc-uboot-1be0d75973eff5a7655f8eb5241661767b97ffd3.tar.gz
talos-obmc-uboot-1be0d75973eff5a7655f8eb5241661767b97ffd3.zip
tegra2: Add UARTB support
UARTB is used on some boards, so support it here. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'board/nvidia/common')
-rw-r--r--board/nvidia/common/board.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
index 5313c76990..4c29167316 100644
--- a/board/nvidia/common/board.c
+++ b/board/nvidia/common/board.c
@@ -38,6 +38,7 @@ DECLARE_GLOBAL_DATA_PTR;
enum {
/* UARTs which we can enable */
UARTA = 1 << 0,
+ UARTB = 1 << 1,
UARTD = 1 << 3,
};
@@ -76,6 +77,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);
}
@@ -92,6 +95,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);
@@ -121,6 +128,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
OpenPOWER on IntegriCloud