generating a phandle w/libfdt?

David Gibson david at gibson.dropbear.id.au
Fri Nov 7 11:02:08 EST 2008


On Thu, Nov 06, 2008 at 05:27:44PM -0600, Scott Wood wrote:
> Yoder Stuart wrote:
>>> -----Original Message-----
>>> From: David Gibson [mailto:david at gibson.dropbear.id.au] Sent: 
>>> Wednesday, November 05, 2008 8:11 PM
>>> To: Kumar Gala
>>> Cc: Yoder Stuart-B08248; devicetree-discuss
>>> Subject: Re: generating a phandle w/libfdt?
>>>
>>> You know, I am inclined to make:
>>> 	linux,phandle = < &thisnode >;
>>> the approved way of doing this.  I *think* that will already work, but
>>> if not we can fix it.  The circular reference is slightly odd, but it
>>> is self-consistent.  I suppose we could still come up with a further
>>> shorthand so it's not necessary to make a label for a node to do this
>>> ('&.' or something for 'reference-to-containing-node').
>>
>> As I mentioned earlier in this thread, this _does_ work and is
>> what we did in the DTS to get phandles generated for nodes that were
>> going to be referenced by nodes dynamically created later.
>
> It works if you call the property something *other* than linux,phandle.
>
> If you explicitly say linux,phandle = <&self> then you get this:
> ERROR (explicit_phandles): /chosen has invalid linux,phandle value  
> 0xffffffff

Well, I guess I'd better fix that, then.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson



More information about the devicetree-discuss mailing list