Re: is there any actual usage of the device tree node "/chosen@0"?

2016-05-23 Thread Greg KH
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?

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


is there any actual usage of the device tree node "/chosen@0"?

2016-05-23 Thread Robert P. J. Day

  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@0");  ?

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

that pretty clearly says that "/chosen@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@0" *
arch/powerpc/boot/oflib.c:  chosen = of_finddevice("/chosen@0");
drivers/of/base.c:  of_chosen = of_find_node_by_path("/chosen@0");
drivers/of/fdt.c:   offset = fdt_path_offset(fdt, "/chosen@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



___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies