[PATCH v4 2/5] sysinfo: Use global sysinfo IDs for existing sysinfo drivers

Sean Anderson sean.anderson at seco.com
Tue Apr 20 16:50:55 CEST 2021


Since 07c9e683a4 ("smbios: Allow a few values to come from sysinfo")
there are common global sysinfo IDs. This patch moved existing IDs above
SYSINFO_ID_USER.

Signed-off-by: Sean Anderson <sean.anderson at seco.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
---

(no changes since v3)

Changes in v3:
- Rework patch to use sjg's sysinfo IDs

Changes in v2:
- Set BOARD_HWVERSION to SYSINFO_ID_REVISION, as they represent the same
  content.
- Use enums instead of defines for sysinfo ids

 drivers/sysinfo/gazerbeam.h | 8 +++++---
 drivers/sysinfo/sandbox.h   | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/sysinfo/gazerbeam.h b/drivers/sysinfo/gazerbeam.h
index 171729d203..6bf3c0098d 100644
--- a/drivers/sysinfo/gazerbeam.h
+++ b/drivers/sysinfo/gazerbeam.h
@@ -5,10 +5,12 @@
  *
  */
 
+#include <sysinfo.h>
+
 enum {
-	BOARD_MULTICHANNEL,
-	BOARD_VARIANT,
-	BOARD_HWVERSION,
+	BOARD_HWVERSION = SYSINFO_ID_BOARD_MODEL,
+	BOARD_MULTICHANNEL = SYSINFO_ID_USER,
+	BOARD_VARIANT
 };
 
 enum {
diff --git a/drivers/sysinfo/sandbox.h b/drivers/sysinfo/sandbox.h
index 2cff494f56..d9c5804c26 100644
--- a/drivers/sysinfo/sandbox.h
+++ b/drivers/sysinfo/sandbox.h
@@ -5,7 +5,7 @@
  */
 
 enum {
-	BOOL_CALLED_DETECT,
+	BOOL_CALLED_DETECT = SYSINFO_ID_USER,
 	INT_TEST1,
 	INT_TEST2,
 	STR_VACATIONSPOT,
-- 
2.25.1



More information about the U-Boot mailing list