summaryrefslogtreecommitdiff
path: root/board/nvidia/common
diff options
context:
space:
mode:
authorLucas Stach <dev@lynxeye.de>2012-09-25 20:21:14 +0000
committerTom Rini <trini@ti.com>2012-10-15 11:54:07 -0700
commit0cd10c7abf3d210c921a0e5c86c2abdbf98c68c5 (patch)
treebf393f294d59bb593f7139834ef00ca2b3324d8a /board/nvidia/common
parent65530a842eeaf7ad07e0613ac6f883f2f1f1e33f (diff)
downloadu-boot-imx-0cd10c7abf3d210c921a0e5c86c2abdbf98c68c5.zip
u-boot-imx-0cd10c7abf3d210c921a0e5c86c2abdbf98c68c5.tar.gz
u-boot-imx-0cd10c7abf3d210c921a0e5c86c2abdbf98c68c5.tar.bz2
tegra20: rework UART GPIO handling
Rename board provided gpio_config_uart() to gpio_early_init_uart() as it does the same thing as the equally called function provided by the uart-switch code. This allows to simply call this function in early board init whether or not we are building with CONFIG_UART_SWITCH defined. Also provide a weak symbol for this function, to avoid the need to provide this function for boards that don't need any fixup. This patch supersedes the earlier posted "tegra: convert gpio_config_uart to weak symbol". Build tested with MAKEALL -s tegra20 Signed-off-by: Lucas Stach <dev@lynxeye.de> Acked-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.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
index 8821fdf..bd194bc 100644
--- a/board/nvidia/common/board.c
+++ b/board/nvidia/common/board.c
@@ -71,6 +71,13 @@ void __pin_mux_spi(void)
void pin_mux_spi(void) __attribute__((weak, alias("__pin_mux_spi")));
+void __gpio_early_init_uart(void)
+{
+}
+
+void gpio_early_init_uart(void)
+__attribute__((weak, alias("__gpio_early_init_uart")));
+
/*
* Routine: power_det_init
* Description: turn off power detects
@@ -155,11 +162,8 @@ int board_early_init_f(void)
/* Initialize periph GPIOs */
gpio_early_init();
-#ifdef CONFIG_SPI_UART_SWITCH
gpio_early_init_uart();
-#else
- gpio_config_uart();
-#endif
+
return 0;
}
#endif /* EARLY_INIT */