Device trees and audio codecs

Timur Tabi timur at freescale.com
Mon Oct 22 23:07:14 EST 2007


Jon Smirl wrote:

> Doing it that way will make the kernel specific to the target device.
> Currently I can load the same mpc5200 kernel on several different
> target devices since the platform specific code is triggered in the
> probe machine phase.

Maybe I need to take a look at your code, but the fabric driver is, in 
effect, a platform-specific driver.  Its job is to figure out what 
hardware is on the board, how it's connected, and then initialize and 
connect the other drivers as appropriate.

> I tried making the fabric driver into a platform driver instead of an
> openfirmware driver, but the mpc5200 code is not initializing platform
> drivers correctly.

Yeah, that wouldn't work.  Platform drivers are initialized way too early.

> I could insert calls into arch/powerpc/platforms/52xx/whatever to load
> the specific asoc fabric, but doing that is a mess. There must be a
> way to trigger loading of machine specific drivers

Either you do it at driver __init time, or via a probe.  The probe 
actually occurs at __init time, anyway, so they're kinda the same thing. 
  The only thing the probe gets you is that you're called multiple times 
for each instance of a node in the tree.

>> Since the Apple audio drivers are not ASoC drivers, I suggest we don't pay
>> attention to what they do.
> 
> Those Apple drivers are very similar to asoc drivers. They could
> easily be folded into the asoc code.

Perhaps, but that's a job for another day (and another developer).




More information about the Linuxppc-dev mailing list