mirror of
https://xff.cz/git/u-boot/
synced 2025-11-01 19:05:51 +01:00
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: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
24
drivers/sysinfo/smbios.c
Normal file
24
drivers/sysinfo/smbios.c
Normal file
@@ -0,0 +1,24 @@
|
||||
// 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,
|
||||
};
|
||||
Reference in New Issue
Block a user