mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-08 11:36:21 -04:00
tegra: Allow boards to perform early GPIO setup
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>
This commit is contained in:
parent
a7dafd7b1a
commit
cb7a1cf36a
@ -132,11 +132,18 @@ int board_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_BOARD_EARLY_INIT_F
|
#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)
|
int board_early_init_f(void)
|
||||||
{
|
{
|
||||||
board_init_uart_f();
|
board_init_uart_f();
|
||||||
|
|
||||||
/* Initialize periph GPIOs */
|
/* Initialize periph GPIOs */
|
||||||
|
gpio_early_init();
|
||||||
#ifdef CONFIG_SPI_UART_SWITCH
|
#ifdef CONFIG_SPI_UART_SWITCH
|
||||||
gpio_early_init_uart();
|
gpio_early_init_uart();
|
||||||
#else
|
#else
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#define _BOARD_H_
|
#define _BOARD_H_
|
||||||
|
|
||||||
void gpio_config_uart(void);
|
void gpio_config_uart(void);
|
||||||
|
void gpio_early_init(void);
|
||||||
void gpio_early_init_uart(void);
|
void gpio_early_init_uart(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user