Re: [U-Boot] [UBOOT PATCH 2/2] dm: core: Scan "/firmware" node by default
On 17.8.2018 20:03, Simon Glass wrote: > Hi Michael, > > On 17 August 2018 at 07:22, Michal Simek wrote: >> On 17.8.2018 14:49, Simon Glass wrote: >>> On 10 August 2018 at 02:45, Rajan Vaja wrote: 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 --- drivers/core/root.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) >>> >>> Reviewed-by: Simon Glass >>> >>> We should add a firmware device for sandbox. >>> >> >> what to add there? > > It can be any device, but I suggest something simple like a > demo-shape? Then you can check that it is accessible in a test in > test/dm/core.c, perhaps. Rajan: please take a look at it. Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [UBOOT PATCH 2/2] dm: core: Scan "/firmware" node by default
Hi Michael, On 17 August 2018 at 07:22, Michal Simek wrote: > On 17.8.2018 14:49, Simon Glass wrote: >> On 10 August 2018 at 02:45, Rajan Vaja wrote: >>> 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 >>> --- >>> drivers/core/root.c | 8 +++- >>> 1 file changed, 7 insertions(+), 1 deletion(-) >> >> Reviewed-by: Simon Glass >> >> We should add a firmware device for sandbox. >> > > what to add there? It can be any device, but I suggest something simple like a demo-shape? Then you can check that it is accessible in a test in test/dm/core.c, perhaps. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [UBOOT PATCH 2/2] dm: core: Scan "/firmware" node by default
On 17.8.2018 14:49, Simon Glass wrote: > On 10 August 2018 at 02:45, Rajan Vaja wrote: >> 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 >> --- >> drivers/core/root.c | 8 +++- >> 1 file changed, 7 insertions(+), 1 deletion(-) > > Reviewed-by: Simon Glass > > We should add a firmware device for sandbox. > what to add there? M ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [UBOOT PATCH 2/2] dm: core: Scan "/firmware" node by default
On 10 August 2018 at 02:45, Rajan Vaja wrote: > 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 > --- > drivers/core/root.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) Reviewed-by: Simon Glass We should add a firmware device for sandbox. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [UBOOT PATCH 2/2] dm: core: Scan "/firmware" node by default
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 --- drivers/core/root.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/core/root.c b/drivers/core/root.c index 1ab4c38..47d10b8 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -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; } -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot