Skip to content
Snippets Groups Projects
Commit 93e310c3 authored by Marek Vasut's avatar Marek Vasut Committed by Tom Rini
Browse files

board-info: Call sysinfo_detect() before sysinfo_get_str()


The sysinfo_get_str() implementation checks whether the sysinfo was even
detected. In U-Boot proper, sysinfo_detect() is not called anywhere but
on one specific board. Call sysinfo_detect() before sysinfo_get_str() to
make sure the sysinfo is detected and sysinfo_get_str() returns valid
value instead of -EPERM.

Signed-off-by: default avatarMarek Vasut <marek.vasut+renesas@gmail.com>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 10f3e157
No related branches found
No related tags found
No related merge requests found
......@@ -32,10 +32,14 @@ int __weak show_board_info(void)
if (IS_ENABLED(CONFIG_SYSINFO)) {
/* This might provide more detail */
ret = sysinfo_get(&dev);
if (!ret)
ret = sysinfo_get_str(dev,
if (!ret) {
ret = sysinfo_detect(dev);
if (!ret) {
ret = sysinfo_get_str(dev,
SYSINFO_ID_BOARD_MODEL,
sizeof(str), str);
}
}
}
/* Fail back to the main 'model' if available */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment