From: Mike Frysinger Date: Wed, 12 Oct 2011 14:02:22 -0400 Subject: [U-Boot] [PATCH v5 5/5] tegra2: Add support for Ventana In-Reply-To: <1318441957-3312-5-git-send-email-swarren@nvidia.com> References: <1318441957-3312-1-git-send-email-swarren@nvidia.com> <1318441957-3312-5-git-send-email-swarren@nvidia.com> Message-ID: <201110121402.24832.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 12 October 2011 13:52:37 Stephen Warren wrote: > --- a/board/nvidia/seaboard/seaboard.c > +++ b/board/nvidia/seaboard/seaboard.c > @@ -32,10 +32,10 @@ > #include "../common/board.h" > > /* > - * Routine: gpio_config_uart > + * Routine: gpio_config_uart_seaboard > * Description: Force GPIO_PI3 low on Seaboard so UART4 works. > */ > -void gpio_config_uart(void) > +void gpio_config_uart_seaboard(void) > { > int gp = GPIO_PI3; > struct gpio_ctlr *gpio = (struct gpio_ctlr *)NV_PA_GPIO_BASE; > @@ -56,6 +56,13 @@ void gpio_config_uart(void) > writel(val, &bank->gpio_dir_out[GPIO_PORT(gp)]); > } > > +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. 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. -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/cf21f5b9/attachment.pgp