[U-Boot] [PATCH v2 4/7] tegra: Allow boards to perform early GPIO setup
Stephen Warren
swarren at wwwdotorg.org
Fri May 25 18:24:50 CEST 2012
On 05/25/2012 07:46 AM, Thierry Reding wrote:
> The new gpio_early_init() function, which does nothing by default, can
> be overridden by boards to configure GPIOs at an early stage.
> diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
> 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
I assert that all early GPIO initialization should be reworked to use
this new gpio_early_init(). In other words, now that there's a single
generic gpio_early_init(), we should remove the following code right
after it:
#ifdef CONFIG_SPI_UART_SWITCH
gpio_early_init_uart();
#else
gpio_config_uart();
#endif
and any boards that need to do any of that (which is just Seaboard I
think) should do that from an implementation of the new generic
gpio_early_init() in their board file. That way, common code won't have
to know about crap like the SPI/UART muxing on Seaboard.
That said, this need not be part of this patch or even this series, so I
don't mean to nak this patch with these comments.
And actually, I'd be all for ripping out all the SPI support on Seaboard
and all related code anyway...
More information about the U-Boot
mailing list