[PATCH] Revert "dm: fdt: scan for devices under /firmware too"
Michal Simek
monstr at monstr.eu
Tue Feb 18 08:22:58 CET 2020
On 17. 02. 20 21:35, Thirupathaiah Annapureddy wrote:
> Subnodes under "/firmware" node are scanned twice in
> dm_scan_fdt_node() and dm_extended_scan_fdt().
> This patch removes the scanning in dm_scan_fdt_node() to
> avoid double scanning.
>
> This reverts commit 747558d014577526bf2e8d9fe9ca748fdbf75d8a.
>
> Signed-off-by: Thirupathaiah Annapureddy <thiruan at linux.microsoft.com>
> ---
> drivers/core/root.c | 15 +++++----------
> 1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/core/root.c b/drivers/core/root.c
> index e85643819e..cb695e933a 100644
> --- a/drivers/core/root.c
> +++ b/drivers/core/root.c
> @@ -254,15 +254,9 @@ 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)) {
> - 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);
> + /* "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");
>
> err = dm_scan_fdt_node(parent, blob, offset,
> pre_reloc_only);
> @@ -279,7 +273,8 @@ static int dm_scan_fdt_node(struct udevice *parent, const void *blob,
> pre_reloc_only);
> if (err && !ret) {
> ret = err;
> - debug("%s: ret=%d\n", node_name, ret);
> + debug("%s: ret=%d\n", fdt_get_name(blob, offset, NULL),
> + ret);
> }
> }
This has come up several times. Please join this thread which is fixing
this issue.
https://lists.denx.de/pipermail/u-boot/2020-February/400165.html
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200218/c7d844c9/attachment.sig>
More information about the U-Boot
mailing list