Board level compatibility matching

M. Warner Losh imp at bsdimp.com
Sat Aug 2 02:01:07 EST 2008


I'd float a radical definition of 'compatible' here.

If the generic code can handle it with just changes to the device
tree, then it is compatible.  And by generic code, I wouldn't suggest
a twisty maze of ifdefs or special case hacks.  I'm talking truly
generic code that is table driven entirely from the dtc.  If you need
special C code to initialize the board, then it isn't compatible.

This is exactly analogous to the pc-net driver supporting dozens of
different cards that differ only in their ID.  Are all these cards
100% the same: no.  There's plenty of differences between them.
However, the pc-net driver copes with the small differences so that
one driver can handle most of the ne2000 class of network cards.

Are there special drivers for ne2000-like cards that aren't quite
compatible enough or have extra features, sure.

That doesn't totally invalidate the utility.  There are always
engineering trade offs to be made.

Warner



More information about the Linuxppc-dev mailing list