summaryrefslogtreecommitdiff
path: root/board/avionic-design/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-11-28 15:04:40 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-12-24 10:23:32 +0100
commitf46a945653146d62e8e8261f119642e302d704d2 (patch)
tree1d1a9953517c9c90729613d7e3825fbc824de63d /board/avionic-design/common
parentbb6997f8402a9074fc7a97c6fb4b892a4dcb095b (diff)
downloadu-boot-imx-f46a945653146d62e8e8261f119642e302d704d2.zip
u-boot-imx-f46a945653146d62e8e8261f119642e302d704d2.tar.gz
u-boot-imx-f46a945653146d62e8e8261f119642e302d704d2.tar.bz2
tegra: Move boards over to use arch-level board UART function
Now that we can set up the UART in common tegra code, make the boards use it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'board/avionic-design/common')
-rw-r--r--board/avionic-design/common/tamonten.c50
1 files changed, 3 insertions, 47 deletions
diff --git a/board/avionic-design/common/tamonten.c b/board/avionic-design/common/tamonten.c
index 98aa0f8..97e59fb 100644
--- a/board/avionic-design/common/tamonten.c
+++ b/board/avionic-design/common/tamonten.c
@@ -27,6 +27,7 @@
#include <ns16550.h>
#include <asm/io.h>
#include <asm/gpio.h>
+#include <asm/arch/board.h>
#include <asm/arch/tegra2.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/clk_rst.h>
@@ -55,44 +56,6 @@ int timer_init(void)
return 0;
}
-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); /* UARTx_CLK_SRC = 00, PLLP_OUT0 */
-
- /* wait for 2us */
- udelay(2);
-
- /* De-assert reset to UART */
- reset_set_enable(pid, 0);
-}
-
-/*
- * Routine: clock_init_uart
- * Description: init the PLL and clock for the UART(s)
- */
-static void clock_init_uart(void)
-{
-#if defined(CONFIG_TEGRA2_ENABLE_UARTD)
- enable_uart(PERIPH_ID_UART4);
-#endif /* CONFIG_TEGRA2_ENABLE_UARTD */
-}
-
-/*
- * Routine: pin_mux_uart
- * Description: setup the pin muxes/tristate values for the UART(s)
- */
-static void pin_mux_uart(void)
-{
-#if defined(CONFIG_TEGRA2_ENABLE_UARTD)
- pinmux_set_func(PINGRP_GMC, PMUX_FUNC_UARTD);
-
- pinmux_tristate_disable(PINGRP_GMC);
-#endif /* CONFIG_TEGRA2_ENABLE_UARTD */
-}
-
#ifdef CONFIG_TEGRA2_MMC
/*
* Routine: pin_mux_mmc
@@ -146,15 +109,8 @@ int board_mmc_init(bd_t *bd)
#ifdef CONFIG_BOARD_EARLY_INIT_F
int board_early_init_f(void)
{
- /* Initialize essential common plls */
- clock_early_init();
-
- /* Initialize UART clocks */
- clock_init_uart();
-
- /* Initialize periph pinmuxes */
- pin_mux_uart();
-
+ /* Initialize selected UARTs */
+ board_init_uart_f();
return 0;
}
#endif /* EARLY_INIT */