From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 15 Aug 2018 10:17:26 -0400 Subject: [U-Boot] [PATCH 01/10] dm: fdt: scan for devices under /firmware too In-Reply-To: <20180813155347.13844-2-jens.wiklander@linaro.org> References: <20180813155347.13844-1-jens.wiklander@linaro.org> <20180813155347.13844-2-jens.wiklander@linaro.org> Message-ID: <20180815141726.GI30947@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > --- > 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! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: