[RFC][PATCH 08/30] powerpc/85xx: Rework P1020 SoC device tree

Kumar Gala galak at kernel.crashing.org
Fri Nov 11 07:27:11 EST 2011


On Nov 10, 2011, at 12:58 PM, Scott Wood wrote:

> On Thu, Nov 10, 2011 at 12:46:27PM -0600, Kumar Gala wrote:
>> 
>> On Nov 10, 2011, at 12:05 PM, Scott Wood wrote:
>> 
>>> On Thu, Nov 10, 2011 at 10:13:51AM -0600, Kumar Gala wrote:
>>>> Split the P1020 SoC device tree into what we can include as a 'prefix'
>>>> to the board device tree and what needs to be included as a 'postfix'.
>>>> 
>>>> This allows use more re-use and less duplication between various board
>>>> device tree configurations (32-bit address map vs 36-bit address map).
>>> 
>>> Could you elaborate on the issues that require this pre/post approach?
>> 
>> We utilize two 'features' of dtc to accomplish things.  One is includes the other is 'merging of labeled nodes'.
>> 
>> We can using merging to allow the board to specify the "reg" & "ranges"
>> values of a SoC node that might vary between physical address maps
>> (32-bit vs 36-bit as example).
>> 
>> dtc is able to 'merge' multiple labeled nodes as well.  So we use that
>> to handle board specific values for something like localbus if we want
>> to support both a 32-bit and 36-bit address map.
>> 
>>> What does the SoC part need to specify that has to override or go within
>>> something the board specifies?
>> 
>> Not sure I follow the question.
> 
> My question is, why does the stuff in post need to be in post, versus pre?
> 
> Why can't pre define the soc node, and let the board dts set ranges? 
> Likewise for localbus, pci, etc.
> 
> -Scott

Gotcha, the reason we have -pre and -post is because of how dtc include mechanism works.  It builds it's tree in the order things are parsed in the file.  In addition, "labeled nodes" like we have in post for 'soc', 'lbc', etc. have to be defined after they are referenced.

- k


More information about the Linuxppc-dev mailing list