[U-Boot] [PATCH v2 4/7] tegra: Allow boards to perform early GPIO setup

Thierry Reding thierry.reding at avionic-design.de
Fri May 25 19:31:34 CEST 2012


* Stephen Warren wrote:
> 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.

I just noticed that I forgot to add an entry to MAINTAINERS for the TEC.
Furthermore I'll need to rebase the patches onto the Tegra branch due to the
major restructuring of the configuration files. Since I'll respin the series
anyway, I could add a patch to make the corresponding change to Seaboard.

> And actually, I'd be all for ripping out all the SPI support on Seaboard
> and all related code anyway...

I can't really comment on this because I've never used the Seaboard. Maybe
Simon (CC'ed) can comment on this. If we decide to completely remove the SPI
support then the above patch becomes obsolete.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120525/e88bdd76/attachment.pgp>


More information about the U-Boot mailing list