devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* is there any continuing value in node "chosen@0"?
@ 2018-08-06 12:32 Robert P. J. Day
  2018-08-06 15:57 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2018-08-06 12:32 UTC (permalink / raw)
  To: Device Tree Mailing List


  while the current DTSpec says nothing about the chosen node possibly
having a unit-address, if i search the current linux kernel code base,
there are a few examples of just that:

$ git grep chosen@
arch/mips/generic/yamon-dt.c:           chosen_off = fdt_path_offset(fdt, "/chosen@0");
arch/mips/generic/yamon-dt.c:           chosen_off = fdt_path_offset(fdt, "/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");
drivers/of/fdt.c:           (strcmp(uname, "chosen") != 0 && strcmp(uname, "chosen@0") != 0))

  is there some lingering value to the node name "chosen@0"? or should
this all be simplified to just "chosen"?

rday

-- 

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

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

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

* Re: is there any continuing value in node "chosen@0"?
  2018-08-06 12:32 is there any continuing value in node "chosen@0"? Robert P. J. Day
@ 2018-08-06 15:57 ` Rob Herring
  2018-08-06 16:55   ` Robert P. J. Day
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2018-08-06 15:57 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: devicetree

On Mon, Aug 6, 2018 at 6:34 AM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>
>
>   while the current DTSpec says nothing about the chosen node possibly
> having a unit-address, if i search the current linux kernel code base,
> there are a few examples of just that:
>
> $ git grep chosen@
> arch/mips/generic/yamon-dt.c:           chosen_off = fdt_path_offset(fdt, "/chosen@0");
> arch/mips/generic/yamon-dt.c:           chosen_off = fdt_path_offset(fdt, "/chosen@0");

Nothing MIPS based should need this I think.

> 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");
> drivers/of/fdt.c:           (strcmp(uname, "chosen") != 0 && strcmp(uname, "chosen@0") != 0))
>
>   is there some lingering value to the node name "chosen@0"? or should
> this all be simplified to just "chosen"?

These are needed for some PPC system(s) though I don't have any clue
which ones specifically.

Rob

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

* Re: is there any continuing value in node "chosen@0"?
  2018-08-06 15:57 ` Rob Herring
@ 2018-08-06 16:55   ` Robert P. J. Day
  0 siblings, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2018-08-06 16:55 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree

On Mon, 6 Aug 2018, Rob Herring wrote:

> On Mon, Aug 6, 2018 at 6:34 AM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> >
> >
> >   while the current DTSpec says nothing about the chosen node
> > possibly having a unit-address, if i search the current linux
> > kernel code base, there are a few examples of just that:
> >
> > $ git grep chosen@
> > arch/mips/generic/yamon-dt.c:           chosen_off = fdt_path_offset(fdt, "/chosen@0");
> > arch/mips/generic/yamon-dt.c:           chosen_off = fdt_path_offset(fdt, "/chosen@0");
>
> Nothing MIPS based should need this I think.

  i just submitted a patch to the MIPS list, and they're applying it
to mips-next for 4.19, so i just need to browbeat the PPC folks into
dropping it, and all references to "/chosen@0" can be tossed entirely.

  i love deleting stuff.

rday

-- 

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

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

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

end of thread, other threads:[~2018-08-06 16:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-06 12:32 is there any continuing value in node "chosen@0"? Robert P. J. Day
2018-08-06 15:57 ` Rob Herring
2018-08-06 16:55   ` Robert P. J. Day

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).