]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: core: Scan "/firmware" node by default
authorRajan Vaja <rajan.vaja@xilinx.com>
Fri, 10 Aug 2018 08:45:34 +0000 (01:45 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 18 Sep 2018 14:12:21 +0000 (08:12 -0600)
All Linux firmware drivers are put under "/firmware" node
and it has support to populate "/firmware" node by default.

u-boot and Linux can share same DTB. In this case, driver
probe for devices under "/firmware" will not be invoked
as "/firmware" does not have its own "compatible" property.

This patch scans "/firmware" node by default like "/clocks".

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/core/root.c

index 1ab4c38bcf5bf6b440b0cf2325fb57c5846a4f81..47d10b888fabd777cc2c2cb7653922901860c091 100644 (file)
@@ -357,8 +357,14 @@ int dm_extended_scan_fdt(const void *blob, bool pre_reloc_only)
        }
 
        ret = dm_scan_fdt_ofnode_path("/clocks", pre_reloc_only);
-       if (ret)
+       if (ret) {
                debug("scan for /clocks failed: %d\n", ret);
+               return ret;
+       }
+
+       ret = dm_scan_fdt_ofnode_path("/firmware", pre_reloc_only);
+       if (ret)
+               debug("scan for /firmware failed: %d\n", ret);
 
        return ret;
 }