All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* is there any actual usage of the device tree node "/chosen@0"?
@ 2016-05-23 17:51 Robert P. J. Day
  2016-05-23 21:31 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2016-05-23 17:51 UTC (permalink / raw
  To: kernelnewbies


  currently perusing the kernel code for device tree processing and
stumbled across this in drivers/of/base.c:

  void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
  {
        struct property *pp;

        of_aliases = of_find_node_by_path("/aliases");
        of_chosen = of_find_node_by_path("/chosen");
        if (of_chosen == NULL)
                of_chosen = of_find_node_by_path("/chosen at 0");  ?????

        if (of_chosen) {
        ... snip ...

that pretty clearly says that "/chosen at 0" is an equivalent node name
for "/chosen", correct? but why was that equivalence first defined?

  if i scan the entire kernel source tree, this is all i get:

$ grep -r "/chosen at 0" *
arch/powerpc/boot/oflib.c:		chosen = of_finddevice("/chosen at 0");
drivers/of/base.c:		of_chosen = of_find_node_by_path("/chosen at 0");
drivers/of/fdt.c:		offset = fdt_path_offset(fdt, "/chosen at 0");
$

so there are apparently three files that *check* for that alternate
name, but not a single .dts or .dtsi that actually uses it. is there
any value to that alternate name?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

* is there any actual usage of the device tree node "/chosen@0"?
  2016-05-23 17:51 is there any actual usage of the device tree node "/chosen@0"? Robert P. J. Day
@ 2016-05-23 21:31 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-05-23 21:31 UTC (permalink / raw
  To: kernelnewbies

On Mon, May 23, 2016 at 01:51:36PM -0400, Robert P. J. Day wrote:
> so there are apparently three files that *check* for that alternate
> name, but not a single .dts or .dtsi that actually uses it. is there
> any value to that alternate name?

Why are you asking that here and not on the device tree mailing list?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-23 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-23 17:51 is there any actual usage of the device tree node "/chosen@0"? Robert P. J. Day
2016-05-23 21:31 ` Greg KH

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.