[U-Boot] [PATCH v5 5/5] tegra2: Add support for Ventana
Mike Frysinger
vapier at gentoo.org
Wed Oct 12 20:12:21 CEST 2011
On Wednesday 12 October 2011 14:06:37 Stephen Warren wrote:
> Mike Frysinger wrote at Wednesday, October 12, 2011 12:02 PM:
> > On Wednesday 12 October 2011 13:52:37 Stephen Warren wrote:
> > > --- a/board/nvidia/seaboard/seaboard.c
> > > +++ b/board/nvidia/seaboard/seaboard.c
> > >
> > > -void gpio_config_uart(void)
> > > +void gpio_config_uart_seaboard(void)
> > > {
> > > ...
> > > +void gpio_config_uart(void)
> > > +{
> > > + if (machine_is_ventana())
> > > + return;
> > > + gpio_config_uart_seaboard();
> > > +}
> >
> > another way to address this would be to add "__weak" to the existing
> > gpio_config_uart() function, and add a gpio_config_uart() stub to
> > board/nvidia/ventana/ventana.c.
>
> There are many boards that are very similar to Seaboard, and hence will
> probably use seaboard.c like Ventana does in this patch. I'm not sure
> exactly which subset of them need the GPIO twiddled to enable the UART
> output, but I suspect not all of them. I think it'll end up being simpler
> to simply list the boards that do/don't right in gpio_config_uart() as
> in this patch. I propose we stick with this style; we can always refactor
> the code as support for more boards are added if it becomes clear that
> one way is better than the other.
sure, you get to maintain this, not me, so whatever is easier for you since
the code size will be the same (once you fix the static issue)
> > although, if machine_is_ventana() returns a constant, and you marked
> > gpio_config_uart_seaboard() static (i think you want to do that anyways),
> > the code should come out the same.
>
> Yes, gpio_config_uart_seaboard() should be static. Do you want me to
> respin for that?
well, the current one is wrong, so you need to post an updated patch before
it'll get merged :)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111012/23572aab/attachment.pgp
More information about the U-Boot
mailing list