[U-Boot] [PATCH 2/3] Add board specific code for da850 EVM

Sudhakar Rajashekhara sudhakar.raj at ti.com
Tue Dec 22 07:30:18 CET 2009


Hi,

On Mon, Dec 21, 2009 at 15:48:38, Nick Thompson wrote:

[...]

> >>
> >> At this point, this seem to be a copy of da830evm.c (well except the first 
> > few lines above).
> >>
> > 
> > I don't think you have observed that the PINMUX registers are different on 
> > da850. So we are at risk of adding many ifdefs now itself if we combine da830 
> > and da850. Also, there are few things which differ between da830 and da850, for 
> > example, MAC address is stored in I2C eeprom on da830 and in SPI eeprom on 
> > da850. You can have a look at http://www.arago-project.org/git/people/?
> > p=sekhar/u-boot-omapl1.git;a=summary to understand how the da830 and da850 
> > files look later when support for most peripherals are added.
> > 
> > To avoid code cluttering, I prefer using two separate files for da830 and da850.
> 
> Yes, the pinmux table definitions are different, but I don't see how this
> requires duplicating code.
> 
> In the latest patches for da830, the pinmux setup is table driven. It would
> be very simple to pull out the two tables into da830 and da850 specific
> files (selected by the build system) and use common pinmux code to setup the
> pins appropriately. The code part for this is simply:
> 
> 	/* configure pinmux settings */
> 	if (davinci_configure_pin_mux_items(pinmuxes, ARRAY_SIZE(pinmuxes)))
> 		return 1;
> 
> That would be exactly the same line of code for both devices.
> 

Now I understand your intention. You are OK having two different files for da830 and
da850, but you want me to put the common code in one place. I'll rework on this patch
based on your comments and will resubmit it.

Also, you are talking about the latest patches for da830 which are following the above
framework, but I did not see them in u-boot-ti branch. Have you submitted them to the
list? If you have any public tree where you have maintained them, can you point me to
that?

Thanks,
Sudhakar




More information about the U-Boot mailing list