All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 01/10] dm: fdt: scan for devices under /firmware too
Date: Wed, 15 Aug 2018 09:31:30 -0600	[thread overview]
Message-ID: <CAL_JsqKTEgG7vV8PLzDkksQA8E60T6X6o1KT5_bD3m2S4P6WEA@mail.gmail.com> (raw)
In-Reply-To: <86d61eb1-e038-622b-fe6b-d4a1345619da@xilinx.com>

On Wed, Aug 15, 2018 at 8:51 AM Michal Simek <michal.simek@xilinx.com> wrote:
>
> Hi Rob,
>
> On 15.8.2018 16:34, Tom Rini wrote:
> > On Wed, Aug 15, 2018 at 04:30:15PM +0200, Michal Simek wrote:
> >> On 15.8.2018 16:17, Tom Rini wrote:
> >>> On Mon, Aug 13, 2018 at 05:53:38PM +0200, Jens Wiklander wrote:
> >>>
> >>>> Just as /chosen may contain devices /firmware may contain devices, scan
> >>>> for devices under /firmware too.
> >>>>
> >>>> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> >>>> ---
> >>>>  drivers/core/root.c | 15 ++++++++++-----
> >>>>  1 file changed, 10 insertions(+), 5 deletions(-)
> >>>>
> >>>> diff --git a/drivers/core/root.c b/drivers/core/root.c
> >>>> index 72bcc7d7f2a3..0dca507e1187 100644
> >>>> --- a/drivers/core/root.c
> >>>> +++ b/drivers/core/root.c
> >>>> @@ -265,9 +265,15 @@ static int dm_scan_fdt_node(struct udevice *parent, const void *blob,
> >>>>    for (offset = fdt_first_subnode(blob, offset);
> >>>>         offset > 0;
> >>>>         offset = fdt_next_subnode(blob, offset)) {
> >>>> -          /* "chosen" node isn't a device itself but may contain some: */
> >>>> -          if (!strcmp(fdt_get_name(blob, offset, NULL), "chosen")) {
> >>>> -                  pr_debug("parsing subnodes of \"chosen\"\n");
> >>>> +          const char *node_name = fdt_get_name(blob, offset, NULL);
> >>>> +
> >>>> +          /*
> >>>> +           * The "chosen" and "firmware" nodes aren't devices
> >>>> +           * themselves but may contain some:
> >>>> +           */
> >>>> +          if (!strcmp(node_name, "chosen") ||
> >>>> +              !strcmp(node_name, "firmware")) {
> >>>> +                  pr_debug("parsing subnodes of \"%s\"\n", node_name);
> >>>>
> >>>>                    err = dm_scan_fdt_node(parent, blob, offset,
> >>>>                                           pre_reloc_only);
> >>>
> >>> So, the /firmware node seems special.  Have you talked with the
> >>> devicetree folks to get it listed in the spec?  That would seem rather
> >>> valuable for something used by many parties.  Thanks!
> >>>
> >>
> >> some days ago we have sent a patch for this too.
> >> https://lists.denx.de/pipermail/u-boot/2018-August/338049.html
> >>
> >> It is using different way but it should do the same thing.
> >
> > OK, so it sounds like in terms of code clean-ups, we need something like
> > what you reference and then some further clean-ups on top of that
> > perhaps for other places to call dm_scan_fdt_ofnode_path() for special
> > cases.  And in terms of formalized specification bits, I do think
> > /firmware should perhaps get kicked up to the spec itself so that it's
> > very clear to all consumers.
>
> I was also checking latest devicetree spec and there is no record about
> /firmware node and how it is supposed to be used.

Patches welcome. :)

It's really only a container to define non-discoverable firmware
interfaces. Typically accessed thru a secure call (for ARM) or a
mailbox. It is primarily just convention rather than a strict
requirement. We have to support firmware nodes at the top-level too
anyways.

Rob

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Michal Simek <michal.simek@xilinx.com>
Cc: devicetree-spec@vger.kernel.org, Tom Rini <trini@konsulko.com>,
	p.aubert@staubli.com, U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH 01/10] dm: fdt: scan for devices under /firmware too
Date: Wed, 15 Aug 2018 09:31:30 -0600	[thread overview]
Message-ID: <CAL_JsqKTEgG7vV8PLzDkksQA8E60T6X6o1KT5_bD3m2S4P6WEA@mail.gmail.com> (raw)
In-Reply-To: <86d61eb1-e038-622b-fe6b-d4a1345619da@xilinx.com>

On Wed, Aug 15, 2018 at 8:51 AM Michal Simek <michal.simek@xilinx.com> wrote:
>
> Hi Rob,
>
> On 15.8.2018 16:34, Tom Rini wrote:
> > On Wed, Aug 15, 2018 at 04:30:15PM +0200, Michal Simek wrote:
> >> On 15.8.2018 16:17, Tom Rini wrote:
> >>> On Mon, Aug 13, 2018 at 05:53:38PM +0200, Jens Wiklander wrote:
> >>>
> >>>> Just as /chosen may contain devices /firmware may contain devices, scan
> >>>> for devices under /firmware too.
> >>>>
> >>>> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> >>>> ---
> >>>>  drivers/core/root.c | 15 ++++++++++-----
> >>>>  1 file changed, 10 insertions(+), 5 deletions(-)
> >>>>
> >>>> diff --git a/drivers/core/root.c b/drivers/core/root.c
> >>>> index 72bcc7d7f2a3..0dca507e1187 100644
> >>>> --- a/drivers/core/root.c
> >>>> +++ b/drivers/core/root.c
> >>>> @@ -265,9 +265,15 @@ static int dm_scan_fdt_node(struct udevice *parent, const void *blob,
> >>>>    for (offset = fdt_first_subnode(blob, offset);
> >>>>         offset > 0;
> >>>>         offset = fdt_next_subnode(blob, offset)) {
> >>>> -          /* "chosen" node isn't a device itself but may contain some: */
> >>>> -          if (!strcmp(fdt_get_name(blob, offset, NULL), "chosen")) {
> >>>> -                  pr_debug("parsing subnodes of \"chosen\"\n");
> >>>> +          const char *node_name = fdt_get_name(blob, offset, NULL);
> >>>> +
> >>>> +          /*
> >>>> +           * The "chosen" and "firmware" nodes aren't devices
> >>>> +           * themselves but may contain some:
> >>>> +           */
> >>>> +          if (!strcmp(node_name, "chosen") ||
> >>>> +              !strcmp(node_name, "firmware")) {
> >>>> +                  pr_debug("parsing subnodes of \"%s\"\n", node_name);
> >>>>
> >>>>                    err = dm_scan_fdt_node(parent, blob, offset,
> >>>>                                           pre_reloc_only);
> >>>
> >>> So, the /firmware node seems special.  Have you talked with the
> >>> devicetree folks to get it listed in the spec?  That would seem rather
> >>> valuable for something used by many parties.  Thanks!
> >>>
> >>
> >> some days ago we have sent a patch for this too.
> >> https://lists.denx.de/pipermail/u-boot/2018-August/338049.html
> >>
> >> It is using different way but it should do the same thing.
> >
> > OK, so it sounds like in terms of code clean-ups, we need something like
> > what you reference and then some further clean-ups on top of that
> > perhaps for other places to call dm_scan_fdt_ofnode_path() for special
> > cases.  And in terms of formalized specification bits, I do think
> > /firmware should perhaps get kicked up to the spec itself so that it's
> > very clear to all consumers.
>
> I was also checking latest devicetree spec and there is no record about
> /firmware node and how it is supposed to be used.

Patches welcome. :)

It's really only a container to define non-discoverable firmware
interfaces. Typically accessed thru a secure call (for ARM) or a
mailbox. It is primarily just convention rather than a strict
requirement. We have to support firmware nodes at the top-level too
anyways.

Rob
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

  reply	other threads:[~2018-08-15 15:31 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-13 15:53 [U-Boot] [PATCH 00/10] AVB using OP-TEE Jens Wiklander
2018-08-13 15:53 ` [U-Boot] [PATCH 01/10] dm: fdt: scan for devices under /firmware too Jens Wiklander
2018-08-15 14:17   ` Tom Rini
2018-08-15 14:30     ` Michal Simek
2018-08-15 14:34       ` Tom Rini
2018-08-15 14:50         ` Michal Simek
2018-08-15 14:50           ` Michal Simek
2018-08-15 15:31           ` Rob Herring [this message]
2018-08-15 15:31             ` Rob Herring
2018-08-15 15:43             ` [U-Boot] " Tom Rini
2018-08-15 15:43               ` Tom Rini
2018-08-13 15:53 ` [U-Boot] [PATCH 02/10] cmd: avb read_rb: print rb_idx in hexadecimal Jens Wiklander
2018-08-14 11:34   ` Igor Opaniuk
2018-08-13 15:53 ` [U-Boot] [PATCH 03/10] mmc: rpmb: add mmc_rpmb_route_frames() Jens Wiklander
2018-08-16 12:13   ` Igor Opaniuk
2018-08-22 13:52     ` Jens Wiklander
2018-08-13 15:53 ` [U-Boot] [PATCH 04/10] Add UCLASS_TEE for Trusted Execution Environment Jens Wiklander
2018-08-16 12:14   ` Igor Opaniuk
2018-08-17 12:48   ` Simon Glass
2018-08-21  9:20     ` Jens Wiklander
2018-08-23 10:45   ` Simon Glass
2018-08-23 11:11     ` Jens Wiklander
2018-08-23 16:31       ` Simon Glass
2018-08-13 15:53 ` [U-Boot] [PATCH 05/10] dt/bindings: add bindings for optee Jens Wiklander
2018-08-13 15:53 ` [U-Boot] [PATCH 06/10] tee: add OP-TEE driver Jens Wiklander
2018-08-16 12:17   ` Igor Opaniuk
2018-08-13 15:53 ` [U-Boot] [PATCH 07/10] arm: dt: hikey: Add optee node Jens Wiklander
2018-08-13 15:53 ` [U-Boot] [PATCH 08/10] optee: support routing of rpmb data frames to mmc Jens Wiklander
2018-08-16 12:23   ` Igor Opaniuk
2018-08-13 15:53 ` [U-Boot] [PATCH 09/10] tee: optee: support AVB trusted application Jens Wiklander
2018-08-16 12:22   ` Igor Opaniuk
2018-08-19 12:42     ` Igor Opaniuk
2018-08-13 15:53 ` [U-Boot] [PATCH 10/10] avb_verify: support using OP-TEE TA AVB Jens Wiklander
2018-08-14 11:20   ` Igor Opaniuk
2018-08-16 12:17     ` Igor Opaniuk
2018-08-23 10:45 ` [U-Boot] [PATCH 00/10] AVB using OP-TEE Simon Glass
2018-08-23 11:23   ` Jens Wiklander
2018-08-23 12:15     ` Igor Opaniuk
2018-08-23 16:31     ` Simon Glass
2018-08-28  6:11       ` Jens Wiklander

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=CAL_JsqKTEgG7vV8PLzDkksQA8E60T6X6o1KT5_bD3m2S4P6WEA@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=u-boot@lists.denx.de \
    /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.