Hi Stephen, On Mon, Oct 10, 2011 at 9:00 AM, Stephen Warren <swar...@nvidia.com> wrote: > Simon Glass wrote at Friday, October 07, 2011 6:03 PM: >> On Thu, Oct 6, 2011 at 10:53 AM, Stephen Warren <swar...@nvidia.com> wrote: >> > Ventana is a board which is very similar to Seaboard. Support it by >> > re-using board/nvidia/seaboard/seaboard.c with minor run-time conditionals. > ... >> > diff --git a/board/nvidia/seaboard/seaboard.c >> > b/board/nvidia/seaboard/seaboard.c >> > index be6ed12..260a56d 100644 >> > --- a/board/nvidia/seaboard/seaboard.c >> > +++ b/board/nvidia/seaboard/seaboard.c >> > @@ -31,10 +31,10 @@ >> > #endif >> > >> > /* >> > - * 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; >> > @@ -55,6 +55,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(); >> > +} >> >> Would it not be better to define a new board file ventana.c, as has >> been done with harmony? Is it because you are wanting to share >> gpio_config_mmc()? But you have written it out again for Harmony. > > Ventana and Seaboard are extremely similar boards; even as more features > are supported, I imagine that a separate seaboard.c and ventana.c would > continue to be mostly identical. The Linux kernel board files support > Ventana within the Seaboard board file (alongside a few other similar > boards) for this reason. > > Yes, harmony.c has its own copy of pin_mux_mmc()/board_mmc_init(); that's > because Harmony's MMC configuration is at least partially different to > Seaboard/Ventana's.
OK, that sounds reasonable. We certainly want to avoid lots of duplicated code. Regards, Simon > > -- > nvpublic > > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot