提交 44c74bdd 编写于 作者: S Simon Glass 提交者: Bin Meng

sysinfo: Provide a default driver to set SMBIOS values

Some boards want to specify the manufacturer or product name but do not
need to have their own sysinfo driver.

Add a default driver which provides a way to specify this SMBIOS
information in the devicetree, without needing any board-specific
functionality.
Signed-off-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
上级 f9696531
......@@ -22,4 +22,12 @@ config SYSINFO_SANDBOX
help
Support querying device information for the Sandbox boards.
config SYSINFO_SMBIOS
bool "Provide a default sysinfo driver for SMBIOS information"
help
Some boards want to specify the manufacturer or product name but do
not need to have their own sysinfo driver. This includes a default
one which provides a way to specify this SMBIOS information in the
devicetree, without needing any board-specific functionality.
endif
......@@ -5,3 +5,4 @@
obj-y += sysinfo-uclass.o
obj-$(CONFIG_SYSINFO_GAZERBEAM) += gazerbeam.o
obj-$(CONFIG_SYSINFO_SANDBOX) += sandbox.o
obj-$(CONFIG_SYSINFO_SMBIOS) += smbios.o
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2020 Google LLC
* Written by Simon Glass <sjg@chromium.org>
*/
#include <common.h>
#include <dm.h>
#include <sysinfo.h>
static const struct udevice_id sysinfo_smbios_ids[] = {
{ .compatible = "u-boot,sysinfo-smbios" },
{ /* sentinel */ }
};
static const struct sysinfo_ops sysinfo_smbios_ops = {
};
U_BOOT_DRIVER(sysinfo_smbios) = {
.name = "sysinfo_smbios",
.id = UCLASS_SYSINFO,
.of_match = sysinfo_smbios_ids,
.ops = &sysinfo_smbios_ops,
};
......@@ -658,6 +658,9 @@ config GENERATE_SMBIOS_TABLE
Check http://www.dmtf.org/standards/smbios for details.
See also SMBIOS_SYSINFO which allows SMBIOS values to be provided in
the devicetree.
config SMBIOS_MANUFACTURER
string "SMBIOS Manufacturer"
depends on GENERATE_SMBIOS_TABLE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册