[PATCH 3/8] i2c: at91: use an id table for SoC dependent parameters

Warner Losh imp at bsdimp.com
Thu Sep 6 14:54:07 EST 2012


On Sep 2, 2012, at 11:21 AM, Sylwester Nawrocki wrote:

> On 09/01/2012 11:10 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
>> On 22:47 Fri 31 Aug     , Sylwester Nawrocki wrote:
>>> On 08/31/2012 04:51 PM, Nicolas Ferre wrote:
>>>> No, it does not have to be exposed to the user: these data are highly
>>>> dependent on the actual hardware (IP revision in fact). So, no need to
>>>> mess with platform data.
>> no I really see no point on these list of platform_id it's does not look more
>> nice just more huggly to have x names. This is at the end the same as passing
>> platform data via soc info (add_xx or dtsi)
>> 
>> And here you just do the same as cpu_is via names.
>> 
>> The driver need to read IP revision instead
> 
> OK, but wouldn't it be needed to resolve an IP revision at run time, e.g.
> with soc_is_*() anyway ? Having it set at each board doesn't look like an 
> optimal method either.

I'd much rather have a DT setting that gives the IP version in some manner, so I can key work arounds off of that.  Not so important for legacy devices where the Errata are well known (since you could do the same thing with some kind of property that's a boolean like for the AT91RM9200's mci controller that needs to swap bytes).  However, given my experience of bringing the FreeBSD at91rm9200 port to life and taking a product to market with it, I'd anticipate that the Errata will evolve over time, as will the need for workarounds.  Having an IP version helps deploy new drivers to the field without needing new DT files.

As you can tell, I'm not a big soc_is_* fan...

Warner


More information about the devicetree-discuss mailing list