All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Loeliger <jdl-CYoMK+44s/E@public.gmane.org>
To: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
Cc: Scott Wood <scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	devicetree-discuss
	<devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
Subject: Re: dtc: Handle linux,phandle properties which self-reference
Date: Mon, 17 Nov 2008 14:12:18 -0600	[thread overview]
Message-ID: <E1L2ASI-0004Ew-31@jdl.com> (raw)
In-Reply-To: <20081107014944.GI6692-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>

> Currently, dtc will generate phandles for nodes which are referenced
> elsewhere in the tree.  phandles can also be explicitly assigned by
> defining the linux,phandle property.  However, there is no way,
> currently to tell dtc to generate a phandle for a node if it is not
> referenced elsewhere.  This is inconvenient when it's expected that
> later processing on the flat tree might add nodes which _will_
> the node in question.
> 
> One way one might attempt to do this is with the construct:
> 	mynode: mynode {
> 		linux,phandle = <&mynode>;
> 		/* ... */
> 	};
> Though it's a trifle odd, there's really only one sensible meaning
> which can be assigned to this construct: allocate a unique phandle to
> "mynode" and put that in its linux,phandle property (as always).
> 
> Currently, however, dtc will choke on this self-reference.  This patch
> corrects this, making the construct above give the expected results.
> It also ensures a more meaningful error message is given if you
> attempt to process the nonsensical construct:
> 	mynode: mynode {
> 		linux,phandle = <&someothernode>;
> 		/* ... */
> 	};
> 
> The 'references' testcase is extended to cover this case, as well.
> 
> Signed-off-by: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>

Applied.

Thanks,
jdl

      parent reply	other threads:[~2008-11-17 20:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07  1:49 dtc: Handle linux,phandle properties which self-reference David Gibson
     [not found] ` <20081107014944.GI6692-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2008-11-17 20:12   ` Jon Loeliger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1L2ASI-0004Ew-31@jdl.com \
    --to=jdl-cyomk+44s/e@public.gmane.org \
    --cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
    --cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.