]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
lib: smbios: Let detect the system via sysinfo
authorMichal Simek <michal.simek@amd.com>
Fri, 26 Apr 2024 13:38:12 +0000 (15:38 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 20 Jun 2024 17:41:42 +0000 (11:41 -0600)
Currently code looks like that it sysinfo drivers are supported but
actually none checking that system is detected. That's why call
sysinfo_detect() to make sure that priv->detected in sysinfo uclass is
setup hence information from driver can be passed to smbios.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
lib/smbios.c

index a822acd48e9b1f68ce7d68009484eca0847c8df2..c6c3b62ae646c343a0c29e7f029323c8612da028 100644 (file)
@@ -573,8 +573,14 @@ ulong write_smbios_table(ulong addr)
        ctx.node = ofnode_null();
        if (IS_ENABLED(CONFIG_OF_CONTROL) && CONFIG_IS_ENABLED(SYSINFO)) {
                uclass_first_device(UCLASS_SYSINFO, &ctx.dev);
-               if (ctx.dev)
+               if (ctx.dev) {
+                       int ret;
+
                        parent_node = dev_read_subnode(ctx.dev, "smbios");
+                       ret = sysinfo_detect(ctx.dev);
+                       if (ret)
+                               return ret;
+               }
        } else {
                ctx.dev = NULL;
        }