On Wed, May 27, 2009 at 11:23:29AM -0500, Scott Wood wrote:That removes the ability to use the device tree to pass information from the bootloader, such as MAC addresses and clock frequencies. On the u-boot list, you'll find people trying such hacks (which were rightly NACKed) as passing the information in the device's volatile registers (which the Linux driver must then not reset) to deal with ARM Linux's lack of this ability.
No one has brought that up on the ARM mailing lists - so does this issue
really exist? All of the stuff I see on the ARM lists seems to be well
behaved and following our existing model - even vendor stuff (supplied
to me under NDA) seems to generally get this kind of stuff right.
Robert> - The oftree layering is fundamentally broken. We alreadyYou can, if you want. But you'll need extra glue code that understands the individual bindings. IMHO that logic is usually better off in the driver itself, but if you really need platform code to involve itself in some way (such as providing callbacks), then exceptions can be made.
Robert> have a sane abstraction for arbitrary hardware in the kernel:
Robert> platform devices. Why not instanciate platform devices from
Robert> a generic oftree core?
No it is not. Device drivers are best written to support devices, and
the platform specific code should not be anywhere near them. Platform
specific code to handle oddities of platforms should be totally separate
from the device driver itself.
smc91x is a prime example of the kind of information drivers need - base
address and irq are very much insufficient to describe how this device is
connected. There's much more information required to specify this device
fully, and throwing it into the driver doesn't work. We've been there
and proven that point.