[PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files

Timur Tabi timur at freescale.com
Thu Feb 15 08:58:01 EST 2007


Benjamin Herrenschmidt wrote:

> In case somebody wants to use something else than uboot ? I'd like the
> base structure of the mandatory nodes to be there. /chosen is mandatory,
> so it should be there.

I just posted a new patch that just deletes linux,boot-cpu and leaves the 
'chosen' node alone.

However, there is a valid reason for *not* having a 'chosen' node in the DTS. 
Currently, U-Boot does not update the existing 'chosen' node.  Instead, it 
creates a new one.  This means that if one existed in the DTS, then there would 
be *two* in the device tree that is passed to the kernel.  There is no way to 
guarantee that the kernel will use the right one.

Of course, the real solution to this problem is to fix U-Boot.  However, there 
isn't any signed up to do that, and even if someone posted a patch right now, 
there's no telling when it will get applied.  And even if it got applied today, 
all current U-Boot installations would be broken.  Many of these systems will 
never be updated.

Therefore, I would say that having a 'chosen' node in the DTS is actually a 
*bad* thing, on systems that use U-Boot.

Another work-around would be to update the compiler to delete the chosen node 
when it builds the DTB.  That's not a bad idea, I think, but until that feature 
is implemented, the DTS files should not have a 'chosen' node.


-- 
Timur Tabi
Linux Kernel Developer @ Freescale



More information about the Linuxppc-dev mailing list