]> git.sur5r.net Git - u-boot/commitdiff
tegra: Allow boards to perform early GPIO setup
authorThierry Reding <thierry.reding@avionic-design.de>
Mon, 4 Jun 2012 20:02:27 +0000 (20:02 +0000)
committerAlbert ARIBAUD (U-Boot) <uboot@lilith.(none)>
Mon, 9 Jul 2012 20:44:32 +0000 (22:44 +0200)
The new gpio_early_init() function, which does nothing by default, can
be overridden by boards to configure GPIOs at an early stage.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
board/nvidia/common/board.c
board/nvidia/common/board.h

index 2e22133591c27347835832b483bb2ad63aa825ba..a159deb675109d68e18631f855b55d619881f128 100644 (file)
@@ -132,11 +132,18 @@ int board_init(void)
 }
 
 #ifdef CONFIG_BOARD_EARLY_INIT_F
+static void __gpio_early_init(void)
+{
+}
+
+void gpio_early_init(void) __attribute__((weak, alias("__gpio_early_init")));
+
 int board_early_init_f(void)
 {
        board_init_uart_f();
 
        /* Initialize periph GPIOs */
+       gpio_early_init();
 #ifdef CONFIG_SPI_UART_SWITCH
        gpio_early_init_uart();
 #else
index 09fb158f4e3ff164d87778f6eff81ad843219dd6..dada4c4f9cb6ac03cb74175294afbccf7bc3a34e 100644 (file)
@@ -25,6 +25,7 @@
 #define _BOARD_H_
 
 void gpio_config_uart(void);
+void gpio_early_init(void);
 void gpio_early_init_uart(void);
 
 /*