]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
tegra20: rework UART GPIO handling
authorLucas Stach <dev@lynxeye.de>
Tue, 25 Sep 2012 20:21:14 +0000 (20:21 +0000)
committerTom Rini <trini@ti.com>
Mon, 15 Oct 2012 18:54:07 +0000 (11:54 -0700)
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>
arch/arm/cpu/arm720t/tegra-common/board.h
arch/arm/cpu/arm720t/tegra-common/spl.c
board/avionic-design/common/tamonten.c
board/compal/paz00/paz00.c
board/compulab/trimslice/trimslice.c
board/nvidia/common/board.c
board/nvidia/harmony/harmony.c
board/nvidia/seaboard/seaboard.c
board/nvidia/whistler/whistler.c

index 61b91c005fd5b2c90c292a4adfcd60330f8b6039..260767d5439dccf074588393d9dae03545e5e6e5 100644 (file)
@@ -22,4 +22,4 @@
  */
 
 void board_init_uart_f(void);
-void gpio_config_uart(void);
+void gpio_early_init_uart(void);
index 3139c65128d776b941ae283e85e9c4c8db80e82b..dfe36b9a4bf3bd1ca60bb154289c5626507566f3 100644 (file)
@@ -63,11 +63,7 @@ void board_init_f(ulong dummy)
        board_init_uart_f();
 
        /* Initialize periph GPIOs */
-#ifdef CONFIG_SPI_UART_SWITCH
        gpio_early_init_uart();
-#else
-       gpio_config_uart();
-#endif
 
        /*
         * We call relocate_code() with relocation target same as the
index 7c05d492f4c05d5da9eb822e26b5a22b8d12e281..e6a932ec3c749f81c5aad68ef2bbdde6a25e196b 100644 (file)
 #include <mmc.h>
 #endif
 
-/*
- * Routine: gpio_config_uart
- * Description: Does nothing on Tamonten - no conflict w/SPI.
- */
-void gpio_config_uart(void)
-{
-}
 
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 void gpio_early_init(void)
index c73ac5f0f454a38247b87a9a7d6d06c9d3d54417..0725989de06938a4f259bb0630f450befd1dda25 100644 (file)
 #include <mmc.h>
 #endif
 
-/*
- * Routine: gpio_config_uart
- * Description: Does nothing on Paz00 - no conflict w/SPI.
- */
-void gpio_config_uart(void)
-{
-}
 
 #ifdef CONFIG_TEGRA_MMC
 /*
index 7b22a87c46d576dc02a2066b3717f70e558b4aa9..9ef66fd86535d45b113aed417b6557c3bcc43626 100644 (file)
 #include <mmc.h>
 #endif
 
-/*
- * Routine: gpio_config_uart
- * Description: Does nothing on TrimSlice - no UART-related GPIOs.
- */
-void gpio_config_uart(void)
-{
-}
 
 void pin_mux_spi(void)
 {
index 8821fdfeba31e3e371603ea24b5130857f316e3b..bd194bc966f9a4d793978cb5b9372015c2d0e7a5 100644 (file)
@@ -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 */
index c23a87ddade33de09b6d7b882d203521c0ab12d0..32ed9bb7d1af682ea5a2a4ccbf84663418f47bc0 100644 (file)
 #include <mmc.h>
 #endif
 
-/*
- * Routine: gpio_config_uart
- * Description: Does nothing on Harmony - no conflict w/SPI.
- */
-void gpio_config_uart(void)
-{
-}
 
 #ifdef CONFIG_TEGRA_MMC
 /*
index ab90a5d574f813eeeaf6f891334fa31150abf32d..4e8a183b8be55c0c8d530e8c1286a12e772f77f4 100644 (file)
@@ -46,7 +46,7 @@ static void gpio_config_uart_seaboard(void)
        gpio_direction_output(GPIO_PI3, 0);
 }
 
-void gpio_config_uart(void)
+void gpio_early_init_uart(void)
 {
        if (machine_is_ventana())
                return;
index af918c4f3678353c6db9b456084fd72e9bc65815..592cd6b496d98fe57fb2e936da58e760da3153ee 100644 (file)
 #include <mmc.h>
 #endif
 
-/*
- * Routine: gpio_config_uart
- * Description: Does nothing on Whistler - no UART-related GPIOs.
- */
-void gpio_config_uart(void)
-{
-}
 
 /*
  * Routine: pin_mux_mmc