[PATCH 2/3] lib: smbios: Let detect the system via sysinfo

Michal Simek michal.simek at amd.com
Fri Apr 26 15:38:12 CEST 2024


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 at amd.com>
---

 lib/smbios.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/smbios.c b/lib/smbios.c
index b190b010f30f..3c1b3cf47e72 100644
--- a/lib/smbios.c
+++ b/lib/smbios.c
@@ -573,8 +573,14 @@ ulong write_smbios_table(ulong addr)
 	ctx.node = ofnode_null();
 	if (IS_ENABLED(CONFIG_OF_CONTROL)) {
 		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;
 	}
-- 
2.44.0



More information about the U-Boot mailing list