On 04/03/2011 06:19 PM, Somebody in the thread at some point said:
Hi -
On the other hand, device trees aren't a static solution. For example, they haven't come up with a generic mechanism for completely describing things like clock and power management domains. But let's figure out schemes for describing these problem areas and fix the device tree model. As more architectures utilize device trees these problem areas should get figured out and the issues will go away. So if you find yourself adding thousands of lines of board specific code to the kernel, something is probably wrong in the device tree generic hardware description, go fix it.
Of course, we should be totally clear here that adding "thousands of lines of board specific code" to the _bootloader_ would be no less of a sign something horrible had gone wrong.
This is an evolutionary process. Start off with selecting in-kernel device trees based on machine ID. Start off with describing the basic
Sounds right.
hardware in the device tree and remove the old kernel code that was building the description. Move on to device trees provided by the bootloader. After basic hardware description is converted move on to
Can you describe why code in the bootloader is a better place than code in the kernel early init? I mean if you go and look in say U-Boot sources, it's a lot less beautiful and elegant than kernel code.
-Andy