mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
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>
This commit is contained in:
parent
6b5763e588
commit
1be0d75973
1 changed files with 10 additions and 0 deletions
|
@ -38,6 +38,7 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||||
enum {
|
enum {
|
||||||
/* UARTs which we can enable */
|
/* UARTs which we can enable */
|
||||||
UARTA = 1 << 0,
|
UARTA = 1 << 0,
|
||||||
|
UARTB = 1 << 1,
|
||||||
UARTD = 1 << 3,
|
UARTD = 1 << 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -76,6 +77,8 @@ static void clock_init_uart(int uart_ids)
|
||||||
{
|
{
|
||||||
if (uart_ids & UARTA)
|
if (uart_ids & UARTA)
|
||||||
enable_uart(PERIPH_ID_UART1);
|
enable_uart(PERIPH_ID_UART1);
|
||||||
|
if (uart_ids & UARTB)
|
||||||
|
enable_uart(PERIPH_ID_UART2);
|
||||||
if (uart_ids & UARTD)
|
if (uart_ids & UARTD)
|
||||||
enable_uart(PERIPH_ID_UART4);
|
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_IRRX);
|
||||||
pinmux_tristate_disable(PINGRP_IRTX);
|
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) {
|
if (uart_ids & UARTD) {
|
||||||
pinmux_set_func(PINGRP_GMC, PMUX_FUNC_UARTD);
|
pinmux_set_func(PINGRP_GMC, PMUX_FUNC_UARTD);
|
||||||
pinmux_tristate_disable(PINGRP_GMC);
|
pinmux_tristate_disable(PINGRP_GMC);
|
||||||
|
@ -121,6 +128,9 @@ int board_early_init_f(void)
|
||||||
#ifdef CONFIG_TEGRA2_ENABLE_UARTA
|
#ifdef CONFIG_TEGRA2_ENABLE_UARTA
|
||||||
uart_ids |= UARTA;
|
uart_ids |= UARTA;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_TEGRA2_ENABLE_UARTB
|
||||||
|
uart_ids |= UARTB;
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_TEGRA2_ENABLE_UARTD
|
#ifdef CONFIG_TEGRA2_ENABLE_UARTD
|
||||||
uart_ids |= UARTD;
|
uart_ids |= UARTD;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue