QUERY: How to handle SOC Configuration (Peripheral Multiplexing) in linux

Bill Gatliff bgat at billgatliff.com
Mon Mar 15 08:52:14 EDT 2010


Shiraz HASHIM wrote:
>
> I think the problem is we cannot change the standard drivers (already in the
> mainline). So if the standard driver doesn't support this in its probe, then
> how should we manage this?
>
> Further these configurations are board dependent, so I think driver must be
> independent of this.
>   

What I think you really want is for your board-specific code (or some
helper code elsewhere in your mach-* directory) to do the pin
assignments, and the drivers just assume that the pins are all right. 
That's the approach used in OMAP2 and AT91, among others, and it seems
to work out just fine.

If you assume that the driver "just knows" what the multiplexer settings
need to be, then sooner or later that same peripheral gets used in a
different SoC and that assumption has to get tossed out.  That's
happening some with the AT91 drivers that can also be used on AVR32
chips.  Best to avoid that extra work by putting the platform-specific
knowledge where it belongs: in the platform-specific code.



b.g.

-- 
Bill Gatliff
Embedded systems training and consulting
http://billgatliff.com
bgat at billgatliff.com




More information about the linux-arm-kernel mailing list