x86: Updates to SMBIOS
Subsystems (8)
v5 cover x86: Updates to SMBIOS
At present there are a few Kconfig options which allow SMBIOS fields to be specified at build time.
Not all fields are supported. Also, defining these at build-time is limiting since a factory system cannot insert values for particular boards or models without rebuilding U-Boot.
This series adds a way to set SMBIOS properties using the devicetree. With this approach, more fields are supported and it is easy to update values in the devicetree in the factory.
It also updates existing boards to use devicetree and drops the CONFIG options, using a new default sysinfo driver.
Changes in v5:
- Fix "sysinfo_gazerbeam" compatible string to use a hyphen
- Add a note as to why the patch does not just rename some files
- Fix up the example for the binding
- Fix "manufactuer" typo
- Fix "Informaiton" typo
- Update commit message to explain why family does not have a default
- Fix 'manuafacture' typo in commit message
- Move the Kconfig comment into the devicetree
- Rename smbios_add_prop_default() to smbios_add_prop()
Changes in v4:
- Fix build error with vexpress_ca9x4
Changes in v3:
- Use a different binding with subnodes for each table type
- Add onto the sysinfo binding
Changes in v2:
- Move dm.h header file to avoid build error on qemu-arm
- Deal with boards that don't use of-control
Simon Glass (13):
board: Rename uclass to sysinfo
doc: Add a binding for sysinfo
x86: Pass an ofnode into each SMBIOS function
smbios: Allow properties to come from the device tree
smbios: Add more properties
smbios: Add documentation and devicetree binding
sysinfo: Provide a default driver to set SMBIOS values
rockchip: Use devicetree for SMBIOS settings
imx: Use devicetree for SMBIOS settings on MYiR MYS-6ULX
odroid-c2: Use devicetree for SMBIOS settings
arm64: mvebu: Use devicetree for SMBIOS settings on uDPU
x86: galileo: Use devicetree for SMBIOS settings
smbios: Drop the unused Kconfig options
arch/arm/dts/armada-3720-uDPU-u-boot.dtsi | 20 +++
.../dts/imx6ull-myir-mys-6ulx-eval-u-boot.dts | 25 ++++
arch/arm/dts/meson-gxbb-odroidc2-u-boot.dtsi | 23 ++++
arch/arm/dts/rk3328-roc-cc-u-boot.dtsi | 21 +++
arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi | 23 ++++
arch/arm/dts/rk3328-rock64-u-boot.dtsi | 21 +++
arch/arm/dts/rk3368-lion-u-boot.dtsi | 20 +++
arch/powerpc/dts/gdsys/gazerbeam-uboot.dtsi | 2 +-
arch/sandbox/dts/test.dts | 8 +-
arch/x86/dts/galileo.dts | 28 ++++
board/gdsys/common/cmd_ioloop.c | 12 +-
board/gdsys/mpc8308/gazerbeam.c | 47 +++----
board/google/chromebook_coral/coral.c | 2 +-
board/intel/galileo/Kconfig | 11 --
common/spl/spl_fit.c | 15 ++-
configs/chromebook_coral_defconfig | 2 +-
configs/clearfog_gt_8k_defconfig | 2 -
configs/gazerbeam_defconfig | 4 +-
configs/lion-rk3368_defconfig | 4 +-
configs/mt7622_rfb_defconfig | 1 -
configs/mvebu_db_armada8k_defconfig | 2 -
configs/myir_mys_6ulx_defconfig | 3 +-
configs/odroid-c2_defconfig | 4 +-
configs/r8a774a1_beacon_defconfig | 2 -
configs/r8a77970_eagle_defconfig | 2 -
configs/r8a77980_condor_defconfig | 2 -
configs/r8a77990_ebisu_defconfig | 2 -
configs/r8a77995_draak_defconfig | 2 -
configs/rcar3_salvator-x_defconfig | 2 -
configs/rcar3_ulcb_defconfig | 2 -
configs/roc-cc-rk3328_defconfig | 4 +-
configs/rock-pi-e-rk3328_defconfig | 4 +-
configs/rock64-rk3328_defconfig | 4 +-
configs/sandbox64_defconfig | 4 +-
configs/sandbox_defconfig | 4 +-
configs/sandbox_flattree_defconfig | 4 +-
configs/sandbox_spl_defconfig | 4 +-
configs/uDPU_defconfig | 3 +-
doc/arch/x86.rst | 8 ++
.../gdsys,sysinfo_gazerbeam.txt} | 8 +-
doc/device-tree-bindings/sysinfo/smbios.txt | 77 +++++++++++
doc/device-tree-bindings/sysinfo/sysinfo.txt | 19 +++
drivers/Kconfig | 4 +-
drivers/Makefile | 2 +-
drivers/board/Kconfig | 25 ----
drivers/board/Makefile | 7 -
drivers/board/board-uclass.c | 71 -----------
drivers/sysinfo/Kconfig | 33 +++++
drivers/sysinfo/Makefile | 8 ++
drivers/{board => sysinfo}/gazerbeam.c | 74 +++++------
drivers/{board => sysinfo}/gazerbeam.h | 0
drivers/{board => sysinfo}/sandbox.c | 50 ++++----
drivers/{board => sysinfo}/sandbox.h | 0
drivers/sysinfo/smbios.c | 24 ++++
drivers/sysinfo/sysinfo-uclass.c | 71 +++++++++++
drivers/timer/mpc83xx_timer.c | 10 +-
include/dm/uclass-id.h | 2 +-
include/smbios.h | 5 +-
include/{board.h => sysinfo.h} | 80 ++++++------
lib/Kconfig | 17 +--
lib/smbios.c | 120 +++++++++++++-----
test/dm/Makefile | 2 +-
test/dm/board.c | 59 ---------
test/dm/sysinfo.c | 59 +++++++++
64 files changed, 761 insertions(+), 419 deletions(-)
create mode 100644 arch/arm/dts/imx6ull-myir-mys-6ulx-eval-u-boot.dts
rename doc/device-tree-bindings/{board/gdsys,board_gazerbeam.txt => sysinfo/gdsys,sysinfo_gazerbeam.txt} (90%)
create mode 100644 doc/device-tree-bindings/sysinfo/smbios.txt
create mode 100644 doc/device-tree-bindings/sysinfo/sysinfo.txt
delete mode 100644 drivers/board/Kconfig
delete mode 100644 drivers/board/Makefile
delete mode 100644 drivers/board/board-uclass.c
create mode 100644 drivers/sysinfo/Kconfig
create mode 100644 drivers/sysinfo/Makefile
rename drivers/{board => sysinfo}/gazerbeam.c (69%)
rename drivers/{board => sysinfo}/gazerbeam.h (100%)
rename drivers/{board => sysinfo}/sandbox.c (50%)
rename drivers/{board => sysinfo}/sandbox.h (100%)
create mode 100644 drivers/sysinfo/smbios.c
create mode 100644 drivers/sysinfo/sysinfo-uclass.c
rename include/{board.h => sysinfo.h} (65%)
delete mode 100644 test/dm/board.c
create mode 100644 test/dm/sysinfo.cSignature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 1/13 board: Rename uclass to sysinfo
This uclass is intended to provide a way to obtain information about a U-Boot board. But the concept of a U-Boot 'board' is the whole system, not just one circuit board, meaning that 'board' is something of a misnomer for this uclass.
In addition, the name 'board' is a bit overused in U-Boot and we want to use the same uclass to provide SMBIOS information.
The obvious name is 'system' but that is so vague as to be meaningless. Use 'sysinfo' instead, since this uclass is aimed at providing information on the system.
Rename everything accordingly.
Note: Due to the patch delta caused by the symbol renames, this patch shows some renamed files as being deleted in one place and created in another.
---
Changes in v5:
- Fix "sysinfo_gazerbeam" compatible string to use a hyphen
- Add a note as to why the patch does not just rename some files
arch/powerpc/dts/gdsys/gazerbeam-uboot.dtsi | 2 +-
arch/sandbox/dts/test.dts | 8 +-
board/gdsys/common/cmd_ioloop.c | 12 +--
board/gdsys/mpc8308/gazerbeam.c | 47 ++++++-----
board/google/chromebook_coral/coral.c | 2 +-
common/spl/spl_fit.c | 15 ++--
configs/chromebook_coral_defconfig | 2 +-
configs/gazerbeam_defconfig | 4 +-
configs/sandbox64_defconfig | 4 +-
configs/sandbox_defconfig | 4 +-
configs/sandbox_flattree_defconfig | 4 +-
configs/sandbox_spl_defconfig | 4 +-
.../gdsys,sysinfo_gazerbeam.txt} | 8 +-
drivers/Kconfig | 4 +-
drivers/Makefile | 2 +-
drivers/board/board-uclass.c | 71 ----------------
drivers/{board => sysinfo}/Kconfig | 16 ++--
drivers/{board => sysinfo}/Makefile | 6 +-
drivers/{board => sysinfo}/gazerbeam.c | 74 ++++++++---------
drivers/{board => sysinfo}/gazerbeam.h | 0
drivers/{board => sysinfo}/sandbox.c | 50 ++++++------
drivers/{board => sysinfo}/sandbox.h | 0
drivers/sysinfo/sysinfo-uclass.c | 71 ++++++++++++++++
drivers/timer/mpc83xx_timer.c | 10 +--
include/dm/uclass-id.h | 2 +-
include/{board.h => sysinfo.h} | 80 +++++++++----------
test/dm/Makefile | 2 +-
test/dm/board.c | 59 --------------
test/dm/sysinfo.c | 59 ++++++++++++++
29 files changed, 314 insertions(+), 308 deletions(-)
rename doc/device-tree-bindings/{board/gdsys,board_gazerbeam.txt => sysinfo/gdsys,sysinfo_gazerbeam.txt} (90%)
delete mode 100644 drivers/board/board-uclass.c
rename drivers/{board => sysinfo}/Kconfig (65%)
rename drivers/{board => sysinfo}/Makefile (50%)
rename drivers/{board => sysinfo}/gazerbeam.c (69%)
rename drivers/{board => sysinfo}/gazerbeam.h (100%)
rename drivers/{board => sysinfo}/sandbox.c (50%)
rename drivers/{board => sysinfo}/sandbox.h (100%)
create mode 100644 drivers/sysinfo/sysinfo-uclass.c
rename include/{board.h => sysinfo.h} (65%)
delete mode 100644 test/dm/board.c
create mode 100644 test/dm/sysinfo.carch/powerpc/dts/gdsys/gazerbeam-uboot.dtsi +1 -1
@@ -32,7 +32,7 @@ }; board { - compatible = "gdsys,board_gazerbeam"; + compatible = "gdsys,sysinfo-gazerbeam"; csb = <&board_soc>; serdes = <&SERDES>; rxaui0 = <&RXAUI0_0>;
arch/sandbox/dts/test.dts +4 -4
@@ -1103,10 +1103,6 @@ compatible = "sandbox,sandbox_osd"; }; - board { - compatible = "sandbox,board_sandbox"; - }; - sandbox_tee { compatible = "sandbox,tee"; };
@@ -1242,6 +1238,10 @@ reset-names = "valid", "no_mask", "out_of_range"; }; + sysinfo { + compatible = "sandbox,sysinfo-sandbox"; + }; + some_regmapped-bus { #address-cells = <0x1>; #size-cells = <0x1>;
board/gdsys/common/cmd_ioloop.c +7 -5
@@ -16,7 +16,7 @@#include <dm.h> #include <misc.h> #include <regmap.h> -#include <board.h> +#include <sysinfo.h> #include "../../../drivers/misc/gdsys_soc.h" #include "../../../drivers/misc/gdsys_ioep.h"
@@ -506,11 +506,11 @@ int do_ioloop(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])int do_iodev (struct cmd_tbl *cmdtp,int flag,int argc,char *const argv[]) {struct udevice *ioep =NULL ; -struct udevice *board; +struct udevice *sysinfo;char name[8 ];int ret; -if (board_get (&board)) +if (sysinfo_get (&sysinfo))return CMD_RET_FAILURE ;if (argc >1 ) {
@@ -518,7 +518,8 @@ int do_iodev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])snprintf (name,sizeof (name),"ioep%d" , i); - ret =uclass_get_device_by_phandle (UCLASS_MISC , board, name, &ioep); + ret =uclass_get_device_by_phandle (UCLASS_MISC , sysinfo, name, + &ioep);if (ret || !ioep) {printf ("Invalid IOEP %d\n" , i);
@@ -532,7 +533,8 @@ int do_iodev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])while (1 ) {snprintf (name,sizeof (name),"ioep%d" , i); - ret =uclass_get_device_by_phandle (UCLASS_MISC , board, name, &ioep); + ret =uclass_get_device_by_phandle (UCLASS_MISC , sysinfo, + name, &ioep);if (ret || !ioep)break ;
board/gdsys/mpc8308/gazerbeam.c +25 -22
110 lines not on this page · raw message
board/google/chromebook_coral/coral.c +1 -1
@@ -150,7 +150,7 @@ static const struct udevice_id coral_ids[] = {U_BOOT_DRIVER (coral_drv) = { .name ="coral" , - .id =UCLASS_BOARD , + .id =UCLASS_SYSINFO , .of_match = coral_ids,ACPI_OPS_PTR (&coral_acpi_ops) };
common/spl/spl_fit.c +8 -7
@@ -6,13 +6,13 @@#include <common.h> #include <errno.h> -#include <board.h> #include <fpga.h> #include <gzip.h> #include <image.h> #include <log.h> #include <malloc.h> #include <spl.h> +#include <sysinfo.h> #include <asm/cache.h> #include <linux/libfdt.h>
@@ -74,7 +74,7 @@ static int spl_fit_get_image_name(const void *fit, int images, const char *type, int index, const char **outname) { - struct udevice *board; + struct udevice *sysinfo;const char *name, *str;__maybe_unused int node;int conf_node;
@@ -110,19 +110,20 @@ static int spl_fit_get_image_name(const void *fit, int images, } } -if (!found && !board_get (&board)) { +if (!found &&CONFIG_IS_ENABLED (SYSINFO ) && !sysinfo_get (&sysinfo)) {int rc;/* -* no string in the property for this index. Check if the board -* level code can supply one. +* no string in the property for this index. Check if the +* sysinfo-level code can supply one. */ - rc =board_get_fit_loadable (board, index - i -1 , type, &str); + rc =sysinfo_get_fit_loadable (sysinfo, index - i -1 , type, + &str);if (rc && rc != -ENOENT )return rc;if (!rc) {/* -* The board provided a name for a loadable. +* The sysinfo provided a name for a loadable. * Try to match it against the description properties * first. If no matching node is found, use it as a * node name.
configs/chromebook_coral_defconfig +1 -1
@@ -77,7 +77,6 @@ CONFIG_SYSCON=y CONFIG_SPL_OF_TRANSLATE=y CONFIG_INTEL_ACPIGEN=y CONFIG_CPU=y -CONFIG_BOARD=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_DW=y CONFIG_MISC=y
@@ -98,6 +97,7 @@ CONFIG_SOUND_MAX98357A=y CONFIG_SOUND_RT5677=y CONFIG_SPI=y CONFIG_ICH_SPI=y +CONFIG_SYSINFO=y CONFIG_TPL_SYSRESET=y # CONFIG_TPM_V1 is not set CONFIG_TPM2_CR50_I2C=y
configs/gazerbeam_defconfig +2 -2
@@ -157,8 +157,6 @@ CONFIG_CLK=y CONFIG_ICS8N3QV01=y CONFIG_CPU=y CONFIG_CPU_MPC83XX=y -CONFIG_BOARD=y -CONFIG_BOARD_GAZERBEAM=y CONFIG_DM_PCA953X=y CONFIG_MPC8XXX_GPIO=y CONFIG_DM_I2C=y
@@ -197,6 +195,8 @@ CONFIG_MPC83XX_SDRAM=y CONFIG_DM_RESET=y CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y +CONFIG_SYSINFO=y +CONFIG_SYSINFO_GAZERBEAM=y CONFIG_SYSRESET=y CONFIG_SYSRESET_MPC83XX=y CONFIG_TIMER=y
configs/sandbox64_defconfig +2 -2
@@ -109,8 +109,6 @@ CONFIG_CPU=y CONFIG_DM_DEMO=y CONFIG_DM_DEMO_SIMPLE=y CONFIG_DM_DEMO_SHAPE=y -CONFIG_BOARD=y -CONFIG_BOARD_SANDBOX=y CONFIG_GPIO_HOG=y CONFIG_DM_GPIO_LOOKUP_LABEL=y CONFIG_PM8916_GPIO=y
@@ -201,6 +199,8 @@ CONFIG_SOC_DEVICE=y CONFIG_SANDBOX_SPI=y CONFIG_SPMI=y CONFIG_SPMI_SANDBOX=y +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SANDBOX=y CONFIG_SYSRESET=y CONFIG_TIMER=y CONFIG_TIMER_EARLY=y
configs/sandbox_defconfig +2 -2
@@ -131,8 +131,6 @@ CONFIG_CPU=y CONFIG_DM_DEMO=y CONFIG_DM_DEMO_SIMPLE=y CONFIG_DM_DEMO_SHAPE=y -CONFIG_BOARD=y -CONFIG_BOARD_SANDBOX=y CONFIG_DMA=y CONFIG_DMA_CHANNELS=y CONFIG_SANDBOX_DMA=y
@@ -238,6 +236,8 @@ CONFIG_SOC_DEVICE=y CONFIG_SANDBOX_SPI=y CONFIG_SPMI=y CONFIG_SPMI_SANDBOX=y +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SANDBOX=y CONFIG_SYSRESET=y CONFIG_TIMER=y CONFIG_TIMER_EARLY=y
configs/sandbox_flattree_defconfig +2 -2
@@ -90,8 +90,6 @@ CONFIG_CPU=y CONFIG_DM_DEMO=y CONFIG_DM_DEMO_SIMPLE=y CONFIG_DM_DEMO_SHAPE=y -CONFIG_BOARD=y -CONFIG_BOARD_SANDBOX=y CONFIG_GPIO_HOG=y CONFIG_DM_GPIO_LOOKUP_LABEL=y CONFIG_PM8916_GPIO=y
@@ -177,6 +175,8 @@ CONFIG_SOC_DEVICE=y CONFIG_SANDBOX_SPI=y CONFIG_SPMI=y CONFIG_SPMI_SANDBOX=y +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SANDBOX=y CONFIG_SYSRESET=y CONFIG_TIMER=y CONFIG_TIMER_EARLY=y
configs/sandbox_spl_defconfig +2 -2
@@ -111,8 +111,6 @@ CONFIG_CPU=y CONFIG_DM_DEMO=y CONFIG_DM_DEMO_SIMPLE=y CONFIG_DM_DEMO_SHAPE=y -CONFIG_BOARD=y -CONFIG_BOARD_SANDBOX=y CONFIG_SPL_FIRMWARE=y CONFIG_GPIO_HOG=y CONFIG_PM8916_GPIO=y
@@ -196,6 +194,8 @@ CONFIG_SOC_DEVICE=y CONFIG_SANDBOX_SPI=y CONFIG_SPMI=y CONFIG_SPMI_SANDBOX=y +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SANDBOX=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_TIMER=y
doc/device-tree-bindings/sysinfo/gdsys,sysinfo_gazerbeam.txt renamed from doc/device-tree-bindings/board/gdsys,board_gazerbeam.txt +4 -4
@@ -1,11 +1,11 @@ -gdsys Gazerbeam board driver +gdsys Gazerbeam sysinfo driver This driver provides capabilities to access the gdsys Gazerbeam board's device information. Furthermore, phandles to some internal devices are provided for the board files. Required properties: -- compatible: should be "gdsys,board_gazerbeam" +- compatible: should be "gdsys,sysinfo-gazerbeam" - csb: phandle to the board's coherent system bus (CSB) device node - rxaui[0-3]: phandles to the rxaui control device nodes - fpga[0-1]: phandles to the board's gdsys FPGA device nodes
@@ -17,8 +17,8 @@ Required properties: Example: -board { - compatible = "gdsys,board_gazerbeam"; +sysinfo { + compatible = "gdsys,sysinfo-gazerbeam"; csb = <&board_soc>; serdes = <&SERDES>; rxaui0 = <&RXAUI0>;
drivers/Kconfig +2 -2
@@ -30,8 +30,6 @@ source "drivers/ddr/Kconfig" source "drivers/demo/Kconfig" -source "drivers/board/Kconfig" - source "drivers/ddr/fsl/Kconfig" source "drivers/dfu/Kconfig"
@@ -114,6 +112,8 @@ source "drivers/spi/Kconfig" source "drivers/spmi/Kconfig" +source "drivers/sysinfo/Kconfig" + source "drivers/sysreset/Kconfig" source "drivers/tee/Kconfig"
drivers/Makefile +1 -1
@@ -27,9 +27,9 @@ obj-$(CONFIG_$(SPL_TPL_)TIMER) += timer/ obj-$(CONFIG_$(SPL_TPL_)VIRTIO) += virtio/ obj-$(CONFIG_$(SPL_)DM_MAILBOX) += mailbox/ obj-$(CONFIG_$(SPL_)REMOTEPROC) += remoteproc/ +obj-$(CONFIG_$(SPL_)SYSINFO) += sysinfo/ obj-$(CONFIG_$(SPL_TPL_)TPM) += tpm/ obj-$(CONFIG_$(SPL_TPL_)ACPI_PMC) += power/acpi_pmc/ -obj-$(CONFIG_$(SPL_)BOARD) += board/ obj-$(CONFIG_XEN) += xen/ obj-$(CONFIG_$(SPL_)FPGA) += fpga/
drivers/board/board-uclass.c deleted +0 -71
71 lines not on this page · raw message
drivers/sysinfo/Kconfig renamed from drivers/board/Kconfig +8 -8
@@ -1,24 +1,24 @@ -menuconfig BOARD - bool "Device Information" +menuconfig SYSINFO + bool "Device System Information" help Support methods to query hardware configurations from internal mechanisms (e.g. reading GPIO values, determining the presence of devices on busses, etc.). This enables the usage of U-Boot with modular board architectures. -if BOARD +if SYSINFO -config SPL_BOARD +config SPL_SYSINFO depends on SPL_DM bool "Enable board driver support in SPL" -config BOARD_GAZERBEAM - bool "Enable board driver for the Gazerbeam board" +config SYSINFO_GAZERBEAM + bool "Enable sysinfo driver for the Gazerbeam board" help Support querying device information for the gdsys Gazerbeam board. -config BOARD_SANDBOX - bool "Enable board driver for the Sandbox board" +config SYSINFO_SANDBOX + bool "Enable sysinfo driver for the Sandbox board" help Support querying device information for the Sandbox boards.
drivers/sysinfo/Makefile renamed from drivers/board/Makefile +3 -3
@@ -2,6 +2,6 @@ # # (C) Copyright 2017 # Mario Six, Guntermann & Drunck GmbH, mario.six at gdsys.cc -obj-y += board-uclass.o -obj-$(CONFIG_BOARD_GAZERBEAM) += gazerbeam.o -obj-$(CONFIG_BOARD_SANDBOX) += sandbox.o +obj-y += sysinfo-uclass.o +obj-$(CONFIG_SYSINFO_GAZERBEAM) += gazerbeam.o +obj-$(CONFIG_SYSINFO_SANDBOX) += sandbox.o
drivers/sysinfo/gazerbeam.c renamed from drivers/board/gazerbeam.c +37 -37
146 lines not on this page · raw message
drivers/sysinfo/gazerbeam.h renamed from drivers/board/gazerbeam.h +0 -0
drivers/sysinfo/sandbox.c renamed from drivers/board/sandbox.c +25 -25
100 lines not on this page · raw message
drivers/sysinfo/sandbox.h renamed from drivers/board/sandbox.h +0 -0
drivers/sysinfo/sysinfo-uclass.c new file +71 -0
71 lines not on this page · raw message
drivers/timer/mpc83xx_timer.c +5 -5
@@ -5,12 +5,12 @@*/ #include <common.h> -#include <board.h> #include <clk.h> #include <dm.h> #include <irq_func.h> #include <log.h> #include <status_led.h> +#include <sysinfo.h> #include <time.h> #include <timer.h> #include <watchdog.h>
@@ -97,7 +97,7 @@ int interrupt_init(void) {immap_t *immr = (immap_t *)CONFIG_SYS_IMMR ;struct udevice *csb; -struct udevice *board; +struct udevice *sysinfo;struct udevice *timer;struct mpc83xx_timer_priv *timer_priv;struct clk clock;
@@ -112,12 +112,12 @@ int interrupt_init(void) timer_priv =dev_get_priv (timer); -if (board_get (&board)) { -debug ("%s: board device could not be fetched.\n" , __func__); +if (sysinfo_get (&sysinfo)) { +debug ("%s: sysinfo device could not be fetched.\n" , __func__);return -ENOENT ; } - ret =uclass_get_device_by_phandle (UCLASS_SIMPLE_BUS , board, + ret =uclass_get_device_by_phandle (UCLASS_SIMPLE_BUS , sysinfo,"csb" , &csb);if (ret) { debug("%s: Could not retrieve CSB device (error: %d)",
include/dm/uclass-id.h +1 -1
@@ -36,7 +36,6 @@ enum uclass_id {UCLASS_AUDIO_CODEC ,/* Audio codec with control and data path */ UCLASS_AXI ,/* AXI bus */ UCLASS_BLK ,/* Block device */ -UCLASS_BOARD ,/* Device information from hardware */ UCLASS_BOOTCOUNT ,/* Bootcount backing store */ UCLASS_BUTTON ,/* Button */ UCLASS_CACHE, /* Cache controller */
@@ -107,6 +106,7 @@ enum uclass_id {UCLASS_SPI_GENERIC ,/* Generic SPI flash target */ UCLASS_SPMI ,/* System Power Management Interface bus */ UCLASS_SYSCON ,/* System configuration device */ +UCLASS_SYSINFO ,/* Device information from hardware */ UCLASS_SYSRESET ,/* System reset device */ UCLASS_TEE ,/* Trusted Execution Environment device */ UCLASS_THERMAL, /* Thermal sensor */
include/sysinfo.h renamed from include/board.h +40 -40
208 lines not on this page · raw message
test/dm/Makefile +1 -1
@@ -21,7 +21,6 @@ obj-$(CONFIG_ACPIGEN) += acpigen.o obj-$(CONFIG_ACPIGEN) += acpi_dp.o obj-$(CONFIG_SOUND) += audio.o obj-$(CONFIG_BLK) += blk.o -obj-$(CONFIG_BOARD) += board.o obj-$(CONFIG_BUTTON) += button.o obj-$(CONFIG_DM_BOOTCOUNT) += bootcount.o obj-$(CONFIG_CLK) += clk.o clk_ccf.o
@@ -78,6 +77,7 @@ obj-$(CONFIG_DM_SERIAL) += serial.o obj-$(CONFIG_CPU) += cpu.o obj-$(CONFIG_SOC_DEVICE) += soc.o obj-$(CONFIG_SOUND) += sound.o +obj-$(CONFIG_SYSINFO) += sysinfo.o obj-$(CONFIG_TEE) += tee.o obj-$(CONFIG_VIRTIO_SANDBOX) += virtio.o obj-$(CONFIG_DMA) += dma.o
test/dm/board.c deleted +0 -59
59 lines not on this page · raw message
test/dm/sysinfo.c new file +59 -0
59 lines not on this page · raw message
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 1/13 board: Rename uclass to sysinfo
Quoted 60 lines · Simon Glass
This uclass is intended to provide a way to obtain information about a U-Boot board. But the concept of a U-Boot 'board' is the whole system, not just one circuit board, meaning that 'board' is something of a misnomer for this uclass.
In addition, the name 'board' is a bit overused in U-Boot and we want to use the same uclass to provide SMBIOS information.
The obvious name is 'system' but that is so vague as to be meaningless. Use 'sysinfo' instead, since this uclass is aimed at providing information on the system.
Rename everything accordingly.
Note: Due to the patch delta caused by the symbol renames, this patch shows some renamed files as being deleted in one place and created in another.
Signed-off-by Simon Glass <[email protected]>---
Changes in v5:
- Fix "sysinfo_gazerbeam" compatible string to use a hyphen
- Add a note as to why the patch does not just rename some filesarch/powerpc/dts/gdsys/gazerbeam-uboot.dtsi | 2 +- arch/sandbox/dts/test.dts | 8 +- board/gdsys/common/cmd_ioloop.c | 12 +-- board/gdsys/mpc8308/gazerbeam.c | 47 ++++++----- board/google/chromebook_coral/coral.c | 2 +- common/spl/spl_fit.c | 15 ++-- configs/chromebook_coral_defconfig | 2 +- configs/gazerbeam_defconfig | 4 +- configs/sandbox64_defconfig | 4 +- configs/sandbox_defconfig | 4 +- configs/sandbox_flattree_defconfig | 4 +- configs/sandbox_spl_defconfig | 4 +- .../gdsys,sysinfo_gazerbeam.txt} | 8 +- drivers/Kconfig | 4 +- drivers/Makefile | 2 +- drivers/board/board-uclass.c | 71 ---------------- drivers/{board => sysinfo}/Kconfig | 16 ++-- drivers/{board => sysinfo}/Makefile | 6 +- drivers/{board => sysinfo}/gazerbeam.c | 74 ++++++++--------- drivers/{board => sysinfo}/gazerbeam.h | 0 drivers/{board => sysinfo}/sandbox.c | 50 ++++++------ drivers/{board => sysinfo}/sandbox.h | 0 drivers/sysinfo/sysinfo-uclass.c | 71 ++++++++++++++++ drivers/timer/mpc83xx_timer.c | 10 +-- include/dm/uclass-id.h | 2 +- include/{board.h => sysinfo.h} | 80 +++++++++---------- test/dm/Makefile | 2 +- test/dm/board.c | 59 -------------- test/dm/sysinfo.c | 59 ++++++++++++++ 29 files changed, 314 insertions(+), 308 deletions(-) rename doc/device-tree-bindings/{board/gdsys,board_gazerbeam.txt => sysinfo/gdsys,sysinfo_gazerbeam.txt} (90%) delete mode 100644 drivers/board/board-uclass.c rename drivers/{board => sysinfo}/Kconfig (65%) rename drivers/{board => sysinfo}/Makefile (50%)
Quoted 9 lines
rename drivers/{board => sysinfo}/gazerbeam.c (69%)
rename drivers/{board => sysinfo}/gazerbeam.h (100%)
rename drivers/{board => sysinfo}/sandbox.c (50%)
rename drivers/{board => sysinfo}/sandbox.h (100%)
create mode 100644 drivers/sysinfo/sysinfo-uclass.c
rename include/{board.h => sysinfo.h} (65%)
delete mode 100644 test/dm/board.c
create mode 100644 test/dm/sysinfo.cPATCH v5 2/13 doc: Add a binding for sysinfo
In reply to Simon GlassAdd a simple binding file for this, so that it is clear what this binding directory is for.
---
Changes in v5:
- Fix up the example for the binding
doc/device-tree-bindings/sysinfo/sysinfo.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 doc/device-tree-bindings/sysinfo/sysinfo.txt
doc/device-tree-bindings/sysinfo/sysinfo.txt new file +19 -0
@@ -0,0 +1,19 @@ +Sysinfo +======= + +This provides capabilities to access information about a board/system, for +use by drivers. + +Required properties: + + - compatible: any suitable string where the driver is in the UCLASS_SYSINFO + class + +See also smbios.txt + + +Example + +sysinfo { + compatible = "sandbox,sysinfo-sandbox"; +};
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 2/13 doc: Add a binding for sysinfo
Quoted 5 lines · Simon Glass
Add a simple binding file for this, so that it is clear what this binding directory is for.
Signed-off-by Simon Glass <[email protected]>
Quoted 9 lines
---
Changes in v5:
- Fix up the example for the bindingdoc/device-tree-bindings/sysinfo/sysinfo.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 doc/device-tree-bindings/sysinfo/sysinfo.txt
PATCH v5 3/13 x86: Pass an ofnode into each SMBIOS function
In reply to Simon GlassAs a first step to obtaining SMBIOS information from the devicetree, add an ofnode parameter to the writing functions.
---
(no changes since v2)
Changes in v2:
- Move dm.h header file to avoid build error on qemu-arm
- Deal with boards that don't use of-control
include/smbios.h | 5 ++++- lib/smbios.c | 44 ++++++++++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 19 deletions(-)
include/smbios.h +4 -1
@@ -8,6 +8,8 @@#ifndef _SMBIOS_H_#define _SMBIOS_H_ +#include <dm/ofnode.h> +/* SMBIOS spec version implemented */ #define SMBIOS_MAJOR_VER 3#define SMBIOS_MINOR_VER 0
@@ -222,9 +224,10 @@ static inline void fill_smbios_header(void *table, int type,* * @addr: start address to write the structure * @handle: the structure's handle, a unique 16-bit number +* @node: node containing the information to write (ofnode_null() if none) * @return: size of the structure */ -typedef int (*smbios_write_type )(ulong *addr,int handle); +typedef int (*smbios_write_type )(ulong *addr,int handle,ofnode node);/** * write_smbios_table() - Write SMBIOS table
lib/smbios.c +26 -18
149 lines not on this page · raw message
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 4/13 smbios: Allow properties to come from the device tree
In reply to Simon GlassSupport a way to put SMBIOS properties in the device tree. These can be placed in a 'board' device in an 'smbios' subnode.
---
Changes in v5:
- Fix "manufactuer" typo
- Fix "Informaiton" typo
Changes in v4:
- Fix build error with vexpress_ca9x4
Changes in v3:
- Use a different binding with subnodes for each table type
lib/smbios.c | 98 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 81 insertions(+), 17 deletions(-)
lib/smbios.c +81 -17
@@ -17,6 +17,18 @@#include <dm/uclass-internal.h> #endif +/** +* struct smbios_write_method - Information about a table-writing function +* +* @write: Function to call +* @subnode_name: Name of subnode which has the information for this function, +* NULL if none +*/ +struct smbios_write_method { +smbios_write_type write; +const char *subnode_name; +}; +/** * smbios_add_string() - add a string to the string area *
@@ -52,6 +64,43 @@ static int smbios_add_string(char *start, const char *str) } } +/** +* smbios_add_prop_default() - Add a property from the device tree or default +* +* @start: string area start address +* @node: node containing the information to write (ofnode_null() if none) +* @prop: property to write +* @def: default string if the node has no such property +* @return 0 if not found, else SMBIOS string number (1 or more) +*/ +static int smbios_add_prop_default (char *start,ofnode node,const char *prop, +const char *def) +{ +const char *str =NULL ; + +if (IS_ENABLED (CONFIG_OF_CONTROL )) + str =ofnode_read_string (node, prop); +if (str) +return smbios_add_string (start, str); +else if (def) +return smbios_add_string (start, def); + +return 0 ; +} + +/** +* smbios_add_prop() - Add a property from the device tree +* +* @start: string area start address +* @node: node containing the information to write (ofnode_null() if none) +* @prop: property to write +* @return 0 if not found, else SMBIOS string number (1 or more) +*/ +static int smbios_add_prop (char *start,ofnode node,const char *prop) +{ +return smbios_add_prop_default (start, node, prop,NULL ); +} +/** * smbios_string_table_len() - compute the string area size *
@@ -120,11 +169,15 @@ static int smbios_write_type1(ulong *current, int handle, ofnode node) t =map_sysmem (*current, len);memset (t,0 ,sizeof (struct smbios_type1 ));fill_smbios_header (t,SMBIOS_SYSTEM_INFORMATION , len, handle); - t->manufacturer =smbios_add_string (t->eos,CONFIG_SMBIOS_MANUFACTURER ); - t->product_name =smbios_add_string (t->eos,CONFIG_SMBIOS_PRODUCT_NAME ); + t->manufacturer =smbios_add_prop_default (t->eos, node,"manufacturer" , +CONFIG_SMBIOS_MANUFACTURER ); + t->product_name =smbios_add_prop_default (t->eos, node,"product" , +CONFIG_SMBIOS_PRODUCT_NAME );if (serial_str) { -strncpy ((char *)t->uuid, serial_str,sizeof (t->uuid)); t->serial_number =smbios_add_string (t->eos, serial_str); +strncpy ((char *)t->uuid, serial_str,sizeof (t->uuid)); + }else { + t->serial_number =smbios_add_prop (t->eos, node,"serial" ); } len = t->length +smbios_string_table_len (t->eos);
@@ -142,8 +195,10 @@ static int smbios_write_type2(ulong *current, int handle, ofnode node) t =map_sysmem (*current, len);memset (t,0 ,sizeof (struct smbios_type2 ));fill_smbios_header (t,SMBIOS_BOARD_INFORMATION , len, handle); - t->manufacturer =smbios_add_string (t->eos,CONFIG_SMBIOS_MANUFACTURER ); - t->product_name =smbios_add_string (t->eos,CONFIG_SMBIOS_PRODUCT_NAME ); + t->manufacturer =smbios_add_prop_default (t->eos, node,"manufacturer" , +CONFIG_SMBIOS_MANUFACTURER ); + t->product_name =smbios_add_prop_default (t->eos, node,"product" , +CONFIG_SMBIOS_PRODUCT_NAME ); t->feature_flags =SMBIOS_BOARD_FEATURE_HOSTING ; t->board_type =SMBIOS_BOARD_MOTHERBOARD ;
@@ -162,7 +217,8 @@ static int smbios_write_type3(ulong *current, int handle, ofnode node) t =map_sysmem (*current, len);memset (t,0 ,sizeof (struct smbios_type3 ));fill_smbios_header (t,SMBIOS_SYSTEM_ENCLOSURE , len, handle); - t->manufacturer =smbios_add_string (t->eos,CONFIG_SMBIOS_MANUFACTURER ); + t->manufacturer =smbios_add_prop_default (t->eos, node,"manufacturer" , +CONFIG_SMBIOS_MANUFACTURER ); t->chassis_type =SMBIOS_ENCLOSURE_DESKTOP ; t->bootup_state =SMBIOS_STATE_SAFE ; t->power_supply_state =SMBIOS_STATE_SAFE ;
@@ -262,19 +318,19 @@ static int smbios_write_type127(ulong *current, int handle, ofnode node)return len; } -static smbios_write_type smbios_write_funcs[] = { - smbios_write_type0, - smbios_write_type1, - smbios_write_type2, - smbios_write_type3, - smbios_write_type4, - smbios_write_type32, - smbios_write_type127 +static struct smbios_write_method smbios_write_funcs[] = { + { smbios_write_type0, }, + { smbios_write_type1,"system" , }, + { smbios_write_type2,"baseboard" , }, + { smbios_write_type3,"chassis" , }, + { smbios_write_type4, }, + { smbios_write_type32, }, + { smbios_write_type127 }, };ulong write_smbios_table (ulong addr) { -ofnode node =ofnode_null (); +ofnode parent_node =ofnode_null ();struct smbios_entry *se;struct udevice *dev;ulong table_addr;
@@ -289,7 +345,7 @@ ulong write_smbios_table(ulong addr)if (IS_ENABLED (CONFIG_OF_CONTROL )) {uclass_first_device (UCLASS_SYSINFO , &dev);if (dev) - node =dev_read_subnode (dev,"smbios" ); + parent_node =dev_read_subnode (dev,"smbios" ); }/* 16 byte align the table address */
@@ -304,7 +360,15 @@ ulong write_smbios_table(ulong addr)/* populate minimum required tables */ for (i =0 ; i <ARRAY_SIZE (smbios_write_funcs); i++) { -int tmp = smbios_write_funcs[i]((ulong *)&addr, handle++, node); +const struct smbios_write_method *method; +ofnode node =ofnode_null (); +int tmp; + + method = &smbios_write_funcs[i]; +if (IS_ENABLED (CONFIG_OF_CONTROL ) && method->subnode_name) + node =ofnode_find_subnode (parent_node, + method->subnode_name); + tmp = method->write ((ulong *)&addr, handle++, node); max_struct_size =max (max_struct_size, tmp); len += tmp;
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 4/13 smbios: Allow properties to come from the device tree
Quoted 11 lines · Simon Glass
Support a way to put SMBIOS properties in the device tree. These can be placed in a 'board' device in an 'smbios' subnode.
Signed-off-by Simon Glass <[email protected]>---
Changes in v5:
- Fix "manufactuer" typo
- Fix "Informaiton" typo
Quoted 9 lines
Changes in v4:
- Fix build error withvexpress_ca9x4Changes in v3:
- Use a different binding with subnodes for each table typelib/smbios.c | 98 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 81 insertions(+), 17 deletions(-)
PATCH v5 5/13 smbios: Add more properties
In reply to Simon GlassThe current tables only support a subset of the available fields defined by the SMBIOS spec. Add a few more.
We could use CONFIG_SYS_CPU or CONFIG_SYS_SOC as a default for family, but the meaning of that value relates more to the whole system rather than just the SoC.
---
Changes in v5:
- Update commit message to explain why family does not have a default
lib/smbios.c | 4 ++++ 1 file changed, 4 insertions(+)
lib/smbios.c +4 -0
@@ -173,12 +173,15 @@ static int smbios_write_type1(ulong *current, int handle, ofnode node) CONFIG_SMBIOS_MANUFACTURER); t->product_name =smbios_add_prop_default (t->eos, node,"product" ,CONFIG_SMBIOS_PRODUCT_NAME ); + t->version =smbios_add_prop (t->eos, node,"version" );if (serial_str) { t->serial_number =smbios_add_string (t->eos, serial_str);strncpy ((char *)t->uuid, serial_str,sizeof (t->uuid)); }else { t->serial_number =smbios_add_prop (t->eos, node,"serial" ); } + t->sku_number =smbios_add_prop (t->eos, node,"sku" ); + t->family =smbios_add_prop (t->eos, node,"family" ); len = t->length +smbios_string_table_len (t->eos); *current += len;
@@ -199,6 +202,7 @@ static int smbios_write_type2(ulong *current, int handle, ofnode node) CONFIG_SMBIOS_MANUFACTURER); t->product_name =smbios_add_prop_default (t->eos, node,"product" ,CONFIG_SMBIOS_PRODUCT_NAME ); + t->asset_tag_number =smbios_add_prop (t->eos, node,"asset-tag" ); t->feature_flags =SMBIOS_BOARD_FEATURE_HOSTING ; t->board_type =SMBIOS_BOARD_MOTHERBOARD ;
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 5/13 smbios: Add more properties
Quoted 8 lines · Simon Glass
The current tables only support a subset of the available fields defined by the SMBIOS spec. Add a few more.
We could use
CONFIG_SYS_CPUorCONFIG_SYS_SOCas a default for family, but the meaning of that value relates more to the whole system rather than just the SoC.
Quoted 9 lines
Signed-off-by Simon Glass <[email protected]>---
Changes in v5:
- Update commit message to explain why family does not have a defaultlib/smbios.c | 4 ++++ 1 file changed, 4 insertions(+)
PATCH v5 6/13 smbios: Add documentation and devicetree binding
In reply to Simon GlassAdd information about how to set SMBIOS properties using the devicetree.
---
(no changes since v1)
doc/arch/x86.rst | 8 +++ doc/device-tree-bindings/sysinfo/smbios.txt | 77 +++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 doc/device-tree-bindings/sysinfo/smbios.txt
doc/arch/x86.rst +8 -0
@@ -740,6 +740,14 @@ Note that this is a development feature only. It is not intended for use in production environments. Also it is not currently part of the automated tests so may break in the future. +SMBIOS tables +------------- + +To generate SMBIOS tables in U-Boot, for use by the OS, enable the +CONFIG_GENERATE_SMBIOS_TABLE option. The easiest way to provide the values to +use is via the device tree. For details see +device-tree-bindings/sysinfo/smbios.txt + TODO List --------- - Audio
doc/device-tree-bindings/sysinfo/smbios.txt new file +77 -0
77 lines not on this page · raw message
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 7/13 sysinfo: Provide a default driver to set SMBIOS values
In reply to Simon GlassSome 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.
---
Changes in v5:
- Fix 'manuafacture' typo in commit message
drivers/sysinfo/Kconfig | 8 ++++++++ drivers/sysinfo/Makefile | 1 + drivers/sysinfo/smbios.c | 24 ++++++++++++++++++++++++ lib/Kconfig | 3 +++ 4 files changed, 36 insertions(+) create mode 100644 drivers/sysinfo/smbios.c
drivers/sysinfo/Kconfig +8 -0
@@ -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 manuafacture 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
drivers/sysinfo/Makefile +1 -0
@@ -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
drivers/sysinfo/smbios.c new file +24 -0
@@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright 2020 Google LLC +* Written by Simon Glass <[email protected]> +*/ + +#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, +};
lib/Kconfig +3 -0
@@ -649,6 +649,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
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 7/13 sysinfo: Provide a default driver to set SMBIOS values
Hi Simon,
Quoted 27 lines · Simon Glass
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 <[email protected]>Reviewed-by Bin Meng <[email protected]>---
Changes in v5:
- Fix 'manuafacture' typo in commit messagedrivers/sysinfo/Kconfig | 8 ++++++++ drivers/sysinfo/Makefile | 1 + drivers/sysinfo/smbios.c | 24 ++++++++++++++++++++++++ lib/Kconfig | 3 +++ 4 files changed, 36 insertions(+) create mode 100644 drivers/sysinfo/smbios.cdrivers/sysinfo/Kconfig +0
-0
drivers/sysinfo/Kconfig config SYSINFO_SANDBOX · line 28
Quoted 7 lines
drivers/sysinfo/Kconfig +4
-0@@ -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 manuafacture or product name but do
One typo unfixed here
drivers/sysinfo/Kconfig config SYSINFO_SANDBOX · line 33
Quoted 5 lines
drivers/sysinfo/Kconfig +4
-0+ 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
Regards,
Bin
PATCH v5 8/13 rockchip: Use devicetree for SMBIOS settings
In reply to Simon GlassAdd settings and enable the default sysinfo driver so that these can come from the device tree.
---
(no changes since v1)
arch/arm/dts/rk3328-roc-cc-u-boot.dtsi | 21 +++++++++++++++++++++ arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi | 23 +++++++++++++++++++++++ arch/arm/dts/rk3328-rock64-u-boot.dtsi | 21 +++++++++++++++++++++ arch/arm/dts/rk3368-lion-u-boot.dtsi | 20 ++++++++++++++++++++ configs/lion-rk3368_defconfig | 4 ++-- configs/roc-cc-rk3328_defconfig | 4 ++-- configs/rock-pi-e-rk3328_defconfig | 4 ++-- configs/rock64-rk3328_defconfig | 4 ++-- 8 files changed, 93 insertions(+), 8 deletions(-)
arch/arm/dts/rk3328-roc-cc-u-boot.dtsi +21 -0
@@ -9,6 +9,27 @@ chosen { u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc; }; + + smbios { + compatible = "u-boot,sysinfo-smbios"; + + smbios { + system { + manufacturer = "firefly"; + product = "roc-rk3328-cc"; + }; + + baseboard { + manufacturer = "firefly"; + product = "roc-rk3328-cc"; + }; + + chassis { + manufacturer = "firefly"; + product = "roc-rk3328-cc"; + }; + }; + }; }; &gpio0 {
arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi +23 -0
@@ -6,6 +6,29 @@ #include "rk3328-u-boot.dtsi" #include "rk3328-sdram-ddr3-666.dtsi" +/ { + smbios { + compatible = "u-boot,sysinfo-smbios"; + + smbios { + system { + manufacturer = "radxa"; + product = "rock-pi-e_rk3328"; + }; + + baseboard { + manufacturer = "radxa"; + product = "rock-pi-e_rk3328"; + }; + + chassis { + manufacturer = "radxa"; + product = "rock-pi-e_rk3328"; + }; + }; + }; +}; + &gpio0 { u-boot,dm-spl; };
arch/arm/dts/rk3328-rock64-u-boot.dtsi +21 -0
@@ -9,6 +9,27 @@ chosen { u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc; }; + + smbios { + compatible = "u-boot,sysinfo-smbios"; + + smbios { + system { + manufacturer = "pine64"; + product = "rock64_rk3328"; + }; + + baseboard { + manufacturer = "pine64"; + product = "rock64_rk3328"; + }; + + chassis { + manufacturer = "pine64"; + product = "rock64_rk3328"; + }; + }; + }; }; &gpio0 {
arch/arm/dts/rk3368-lion-u-boot.dtsi +20 -0
@@ -14,6 +14,26 @@ u-boot,spl-boot-order = &emmc, &sdmmc; }; + smbios { + compatible = "u-boot,sysinfo-smbios"; + + smbios { + system { + manufacturer = "rockchip"; + product = "sheep_rk3368"; + }; + + baseboard { + manufacturer = "rockchip"; + product = "sheep_rk3368"; + }; + + chassis { + manufacturer = "rockchip"; + product = "sheep_rk3368"; + }; + }; + }; }; &pinctrl {
configs/lion-rk3368_defconfig +2 -2
@@ -16,7 +16,6 @@ CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_DEFAULT_DEVICE_TREE="rk3368-lion" -CONFIG_SMBIOS_PRODUCT_NAME="sheep_rk3368" CONFIG_DEBUG_UART=y CONFIG_ANDROID_BOOT_IMAGE=y CONFIG_FIT=y
@@ -89,4 +88,5 @@ CONFIG_SYSRESET=y CONFIG_SPL_TINY_MEMSET=y CONFIG_LZO=y CONFIG_ERRNO_STR=y -CONFIG_SMBIOS_MANUFACTURER="rockchip" +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y
configs/roc-cc-rk3328_defconfig +2 -2
@@ -13,7 +13,6 @@ CONFIG_SPL_STACK_R_ADDR=0x600000 CONFIG_DEBUG_UART_BASE=0xFF130000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEFAULT_DEVICE_TREE="rk3328-roc-cc" -CONFIG_SMBIOS_PRODUCT_NAME="roc-rk3328-cc" CONFIG_DEBUG_UART=y CONFIG_TPL_SYS_MALLOC_F_LEN=0x800 # CONFIG_ANDROID_BOOT_IMAGE is not set
@@ -100,4 +99,5 @@ CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_SPL_TINY_MEMSET=y CONFIG_TPL_TINY_MEMSET=y CONFIG_ERRNO_STR=y -CONFIG_SMBIOS_MANUFACTURER="firefly" +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y
configs/rock-pi-e-rk3328_defconfig +2 -2
@@ -14,7 +14,6 @@ CONFIG_SPL_SYS_MALLOC_F_LEN=0x4000 CONFIG_DEBUG_UART_BASE=0xFF130000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEFAULT_DEVICE_TREE="rk3328-rock-pi-e" -CONFIG_SMBIOS_PRODUCT_NAME="rock-pi-e_rk3328" CONFIG_DEBUG_UART=y CONFIG_TPL_SYS_MALLOC_F_LEN=0x800 # CONFIG_ANDROID_BOOT_IMAGE is not set
@@ -102,4 +101,5 @@ CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_SPL_TINY_MEMSET=y CONFIG_TPL_TINY_MEMSET=y CONFIG_ERRNO_STR=y -CONFIG_SMBIOS_MANUFACTURER="radxa" +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y
configs/rock64-rk3328_defconfig +2 -2
@@ -13,7 +13,6 @@ CONFIG_SPL_STACK_R_ADDR=0x600000 CONFIG_DEBUG_UART_BASE=0xFF130000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEFAULT_DEVICE_TREE="rk3328-rock64" -CONFIG_SMBIOS_PRODUCT_NAME="rock64_rk3328" CONFIG_DEBUG_UART=y CONFIG_TPL_SYS_MALLOC_F_LEN=0x800 # CONFIG_ANDROID_BOOT_IMAGE is not set
@@ -99,4 +98,5 @@ CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_SPL_TINY_MEMSET=y CONFIG_TPL_TINY_MEMSET=y CONFIG_ERRNO_STR=y -CONFIG_SMBIOS_MANUFACTURER="pine64" +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 9/13 imx: Use devicetree for SMBIOS settings on MYiR MYS-6ULX
In reply to Simon GlassAdd settings and enable the default sysinfo driver so that these can come from the device tree.
---
(no changes since v1)
.../dts/imx6ull-myir-mys-6ulx-eval-u-boot.dts | 25 +++++++++++++++++++ configs/myir_mys_6ulx_defconfig | 3 ++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/imx6ull-myir-mys-6ulx-eval-u-boot.dts
arch/arm/dts/imx6ull-myir-mys-6ulx-eval-u-boot.dts new file +25 -0
@@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2020 Linumiz + * Author: Parthiban Nallathambi <[email protected]> + */ + +/ { + smbios { + compatible = "u-boot,sysinfo-smbios"; + + smbios { + system { + manufacturer = "MYiR"; + }; + + baseboard { + manufacturer = "MYiR"; + }; + + chassis { + manufacturer = "MYiR"; + }; + }; + }; +};
configs/myir_mys_6ulx_defconfig +2 -1
@@ -67,4 +67,5 @@ CONFIG_MXC_UART=y CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_GADGET=y -CONFIG_SMBIOS_MANUFACTURER="MYiR" +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 10/13 odroid-c2: Use devicetree for SMBIOS settings
In reply to Simon GlassAdd settings and enable the default sysinfo driver so that these can come from the device tree.
---
(no changes since v1)
arch/arm/dts/meson-gxbb-odroidc2-u-boot.dtsi | 23 ++++++++++++++++++++ configs/odroid-c2_defconfig | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-)
arch/arm/dts/meson-gxbb-odroidc2-u-boot.dtsi +23 -0
@@ -6,6 +6,29 @@ #include "meson-gx-u-boot.dtsi" +/ { + smbios { + compatible = "u-boot,sysinfo-smbios"; + + smbios { + system { + manufacturer = "Hardkernel Co., Ltd."; + product = "ODROID-C2"; + }; + + baseboard { + manufacturer = "Hardkernel Co., Ltd."; + product = "ODROID-C2"; + }; + + chassis { + manufacturer = "Hardkernel Co., Ltd."; + product = "ODROID-C2"; + }; + }; + }; +}; + &usb0 { status = "disabled"; };
configs/odroid-c2_defconfig +2 -2
@@ -8,7 +8,6 @@ CONFIG_DEBUG_UART_BASE=0xc81004c0 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_IDENT_STRING=" odroid-c2" CONFIG_DEFAULT_DEVICE_TREE="meson-gxbb-odroidc2" -CONFIG_SMBIOS_PRODUCT_NAME="ODROID-C2" CONFIG_DEBUG_UART=y CONFIG_OF_BOARD_SETUP=y # CONFIG_DISPLAY_CPUINFO is not set
@@ -64,4 +63,5 @@ CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER="Hardkernel Co., Ltd." +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 11/13 arm64: mvebu: Use devicetree for SMBIOS settings on uDPU
In reply to Simon GlassAdd settings and enable the default sysinfo driver so that these can come from the device tree.
---
(no changes since v1)
arch/arm/dts/armada-3720-uDPU-u-boot.dtsi | 20 ++++++++++++++++++++ configs/uDPU_defconfig | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-)
arch/arm/dts/armada-3720-uDPU-u-boot.dtsi +20 -0
@@ -1,5 +1,25 @@ // SPDX-License-Identifier: GPL-2.0+ +/ { + smbios { + compatible = "u-boot,sysinfo-smbios"; + + smbios { + system { + product = "uDPU"; + }; + + baseboard { + product = "uDPU"; + }; + + chassis { + product = "uDPU"; + }; + }; + }; +}; + &spi0 { u-boot,dm-pre-reloc;
configs/uDPU_defconfig +2 -1
@@ -11,7 +11,6 @@ CONFIG_DM_GPIO=y CONFIG_DEBUG_UART_BASE=0xd0012000 CONFIG_DEBUG_UART_CLOCK=25804800 CONFIG_DEFAULT_DEVICE_TREE="armada-3720-uDPU" -CONFIG_SMBIOS_PRODUCT_NAME="uDPU" CONFIG_DEBUG_UART=y CONFIG_AHCI=y CONFIG_DISTRO_DEFAULTS=y
@@ -97,3 +96,5 @@ CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y CONFIG_LZO=y CONFIG_SPL_LZO=y +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 12/13 x86: galileo: Use devicetree for SMBIOS settings
In reply to Simon GlassAdd settings and enable the default sysinfo driver so that these can come from the device tree.
---
Changes in v5:
- Move the Kconfig comment into the devicetree
arch/x86/dts/galileo.dts | 28 ++++++++++++++++++++++++++++ board/intel/galileo/Kconfig | 11 ----------- 2 files changed, 28 insertions(+), 11 deletions(-)
arch/x86/dts/galileo.dts +28 -0
@@ -164,4 +164,32 @@ }; }; + smbios { + compatible = "u-boot,sysinfo-smbios"; + + /* + * Override the default product name U-Boot reports in the + * SMBIOS table, to be compatible with the Intel provided UEFI + * BIOS, as Linux kernel drivers + * (drivers/mfd/intel_quark_i2c_gpio.c and + * drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c) make use of + * it to do different board level configuration. + * + * This can be "Galileo" for GEN1 Galileo board. + */ + smbios { + system { + product = "GalileoGen2"; + }; + + baseboard { + product = "GalileoGen2"; + }; + + chassis { + product = "GalileoGen2"; + }; + }; + }; + };
board/intel/galileo/Kconfig +0 -11
@@ -22,15 +22,4 @@ config BOARD_SPECIFIC_OPTIONS # dummy select BOARD_ROMSIZE_KB_1024 select SPI_FLASH_WINBOND -config SMBIOS_PRODUCT_NAME - default "GalileoGen2" - help - Override the default product name U-Boot reports in the SMBIOS - table, to be compatible with the Intel provided UEFI BIOS, as - Linux kernel drivers (drivers/mfd/intel_quark_i2c_gpio.c and - drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c) make use of - it to do different board level configuration. - - This can be "Galileo" for GEN1 Galileo board. - endif
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 12/13 x86: galileo: Use devicetree for SMBIOS settings
Quoted 5 lines · Simon Glass
Add settings and enable the default sysinfo driver so that these can come from the device tree.
Signed-off-by Simon Glass <[email protected]>
Quoted 9 lines
---
Changes in v5:
- Move theKconfigcomment into the devicetreearch/x86/dts/galileo.dts | 28 ++++++++++++++++++++++++++++ board/intel/galileo/Kconfig | 11 ----------- 2 files changed, 28 insertions(+), 11 deletions(-)
PATCH v5 13/13 smbios: Drop the unused Kconfig options
In reply to Simon GlassNow that we can use devicetree to specify this information, drop the old CONFIG options.
---
Changes in v5:
- Rename smbios_add_prop_default() to smbios_add_prop()
Changes in v3:
- Add onto the sysinfo binding
configs/clearfog_gt_8k_defconfig | 2 -- configs/mt7622_rfb_defconfig | 1 - configs/mvebu_db_armada8k_defconfig | 2 -- configs/r8a774a1_beacon_defconfig | 2 -- configs/r8a77970_eagle_defconfig | 2 -- configs/r8a77980_condor_defconfig | 2 -- configs/r8a77990_ebisu_defconfig | 2 -- configs/r8a77995_draak_defconfig | 2 -- configs/rcar3_salvator-x_defconfig | 2 -- configs/rcar3_ulcb_defconfig | 2 -- lib/Kconfig | 16 ---------- lib/smbios.c | 46 ++++++++--------------------- 12 files changed, 13 insertions(+), 68 deletions(-)
configs/clearfog_gt_8k_defconfig +0 -2
@@ -12,7 +12,6 @@ CONFIG_DM_GPIO=y CONFIG_DEBUG_UART_BASE=0xf0512000 CONFIG_DEBUG_UART_CLOCK=200000000 CONFIG_DEFAULT_DEVICE_TREE="armada-8040-clearfog-gt-8k" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_DEBUG_UART=y CONFIG_AHCI=y CONFIG_DISTRO_DEFAULTS=y
@@ -78,4 +77,3 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y -CONFIG_SMBIOS_MANUFACTURER=""
configs/mt7622_rfb_defconfig +0 -1
@@ -5,7 +5,6 @@ CONFIG_SYS_TEXT_BASE=0x41e00000 CONFIG_SYS_MALLOC_F_LEN=0x4000 CONFIG_NR_DRAM_BANKS=1 CONFIG_DEFAULT_DEVICE_TREE="mt7622-rfb" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_DEFAULT_FDT_FILE="mt7622-rfb" CONFIG_LOGLEVEL=7
configs/mvebu_db_armada8k_defconfig +0 -2
@@ -11,7 +11,6 @@ CONFIG_ENV_SECT_SIZE=0x10000 CONFIG_DEBUG_UART_BASE=0xf0512000 CONFIG_DEBUG_UART_CLOCK=200000000 CONFIG_DEFAULT_DEVICE_TREE="armada-8040-db" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_DEBUG_UART=y CONFIG_AHCI=y CONFIG_DISTRO_DEFAULTS=y
@@ -72,4 +71,3 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y -CONFIG_SMBIOS_MANUFACTURER=""
configs/r8a774a1_beacon_defconfig +0 -2
@@ -8,7 +8,6 @@ CONFIG_RCAR_GEN3=y CONFIG_TARGET_BEACON_RZG2M=y # CONFIG_SPL is not set CONFIG_DEFAULT_DEVICE_TREE="r8a774a1-beacon-rzg2m-kit" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
@@ -64,4 +63,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""
configs/r8a77970_eagle_defconfig +0 -2
@@ -11,7 +11,6 @@ CONFIG_SPL_TEXT_BASE=0xe6318000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_EAGLE=y CONFIG_DEFAULT_DEVICE_TREE="r8a77970-eagle-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y
@@ -74,4 +73,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""
configs/r8a77980_condor_defconfig +0 -2
@@ -11,7 +11,6 @@ CONFIG_SPL_TEXT_BASE=0xe6318000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_CONDOR=y CONFIG_DEFAULT_DEVICE_TREE="r8a77980-condor-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y
@@ -75,4 +74,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""
configs/r8a77990_ebisu_defconfig +0 -2
@@ -10,7 +10,6 @@ CONFIG_SPL_TEXT_BASE=0xe6318000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_EBISU=y CONFIG_DEFAULT_DEVICE_TREE="r8a77990-ebisu-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y
@@ -84,4 +83,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""
configs/r8a77995_draak_defconfig +0 -2
@@ -10,7 +10,6 @@ CONFIG_SPL_TEXT_BASE=0xe6318000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_DRAAK=y CONFIG_DEFAULT_DEVICE_TREE="r8a77995-draak-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y
@@ -85,4 +84,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""
configs/rcar3_salvator-x_defconfig +0 -2
@@ -9,7 +9,6 @@ CONFIG_SPL_TEXT_BASE=0xe6338000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_SALVATOR_X=y CONFIG_DEFAULT_DEVICE_TREE="r8a77950-salvator-x-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y
@@ -89,4 +88,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""
configs/rcar3_ulcb_defconfig +0 -2
@@ -10,7 +10,6 @@ CONFIG_SPL_TEXT_BASE=0xe6338000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_ULCB=y CONFIG_DEFAULT_DEVICE_TREE="r8a77950-ulcb-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y
@@ -87,4 +86,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""
lib/Kconfig +0 -16
@@ -652,22 +652,6 @@ config GENERATE_SMBIOS_TABLE 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 - default SYS_VENDOR - help - The board manufacturer to store in SMBIOS structures. - Change this to override the default one (CONFIG_SYS_VENDOR). - -config SMBIOS_PRODUCT_NAME - string "SMBIOS Product Name" - depends on GENERATE_SMBIOS_TABLE - default SYS_BOARD - help - The product name to store in SMBIOS structures. - Change this to override the default one (CONFIG_SYS_BOARD). - endmenu config ASN1_COMPILER
lib/smbios.c +13 -33
83 lines not on this page · raw message
Signature · 1 line
2.29.1.341.ge80a0c044ae-goog
PATCH v5 13/13 smbios: Drop the unused Kconfig options
Hi Simon,
Quoted 205 lines · Simon Glass
Now that we can use devicetree to specify this information, drop the old CONFIG options.
Signed-off-by Simon Glass <[email protected]>---
Changes in v5:
- Renamesmbios_add_prop_default()tosmbios_add_prop()Changes in v3:
- Add onto the sysinfo bindingconfigs/clearfog_gt_8k_defconfig | 2 -- configs/mt7622_rfb_defconfig | 1 - configs/mvebu_db_armada8k_defconfig | 2 -- configs/r8a774a1_beacon_defconfig | 2 -- configs/r8a77970_eagle_defconfig | 2 -- configs/r8a77980_condor_defconfig | 2 -- configs/r8a77990_ebisu_defconfig | 2 -- configs/r8a77995_draak_defconfig | 2 -- configs/rcar3_salvator-x_defconfig | 2 -- configs/rcar3_ulcb_defconfig | 2 -- lib/Kconfig | 16 ---------- lib/smbios.c | 46 ++++++++--------------------- 12 files changed, 13 insertions(+), 68 deletions(-)configs/clearfog_gt_8k_defconfig +0
-2@@ -12,7 +12,6 @@ CONFIG_DM_GPIO=y CONFIG_DEBUG_UART_BASE=0xf0512000 CONFIG_DEBUG_UART_CLOCK=200000000 CONFIG_DEFAULT_DEVICE_TREE="armada-8040-clearfog-gt-8k" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_DEBUG_UART=y CONFIG_AHCI=y CONFIG_DISTRO_DEFAULTS=y@@ -78,4 +77,3 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y -CONFIG_SMBIOS_MANUFACTURER=""configs/mt7622_rfb_defconfig +0
-1@@ -5,7 +5,6 @@ CONFIG_SYS_TEXT_BASE=0x41e00000 CONFIG_SYS_MALLOC_F_LEN=0x4000 CONFIG_NR_DRAM_BANKS=1 CONFIG_DEFAULT_DEVICE_TREE="mt7622-rfb" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_DEFAULT_FDT_FILE="mt7622-rfb" CONFIG_LOGLEVEL=7configs/mvebu_db_armada8k_defconfig +0
-2@@ -11,7 +11,6 @@ CONFIG_ENV_SECT_SIZE=0x10000 CONFIG_DEBUG_UART_BASE=0xf0512000 CONFIG_DEBUG_UART_CLOCK=200000000 CONFIG_DEFAULT_DEVICE_TREE="armada-8040-db" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_DEBUG_UART=y CONFIG_AHCI=y CONFIG_DISTRO_DEFAULTS=y@@ -72,4 +71,3 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y -CONFIG_SMBIOS_MANUFACTURER=""configs/r8a774a1_beacon_defconfig +0
-2@@ -8,7 +8,6 @@ CONFIG_RCAR_GEN3=y CONFIG_TARGET_BEACON_RZG2M=y # CONFIG_SPL is not set CONFIG_DEFAULT_DEVICE_TREE="r8a774a1-beacon-rzg2m-kit" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set@@ -64,4 +63,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""configs/r8a77970_eagle_defconfig +0
-2@@ -11,7 +11,6 @@ CONFIG_SPL_TEXT_BASE=0xe6318000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_EAGLE=y CONFIG_DEFAULT_DEVICE_TREE="r8a77970-eagle-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y@@ -74,4 +73,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""configs/r8a77980_condor_defconfig +0
-2@@ -11,7 +11,6 @@ CONFIG_SPL_TEXT_BASE=0xe6318000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_CONDOR=y CONFIG_DEFAULT_DEVICE_TREE="r8a77980-condor-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y@@ -75,4 +74,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""configs/r8a77990_ebisu_defconfig +0
-2@@ -10,7 +10,6 @@ CONFIG_SPL_TEXT_BASE=0xe6318000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_EBISU=y CONFIG_DEFAULT_DEVICE_TREE="r8a77990-ebisu-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y@@ -84,4 +83,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""configs/r8a77995_draak_defconfig +0
-2@@ -10,7 +10,6 @@ CONFIG_SPL_TEXT_BASE=0xe6318000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_DRAAK=y CONFIG_DEFAULT_DEVICE_TREE="r8a77995-draak-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y@@ -85,4 +84,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""configs/rcar3_salvator-x_defconfig +0
-2@@ -9,7 +9,6 @@ CONFIG_SPL_TEXT_BASE=0xe6338000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_SALVATOR_X=y CONFIG_DEFAULT_DEVICE_TREE="r8a77950-salvator-x-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y@@ -89,4 +88,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""configs/rcar3_ulcb_defconfig +0
-2@@ -10,7 +10,6 @@ CONFIG_SPL_TEXT_BASE=0xe6338000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_ULCB=y CONFIG_DEFAULT_DEVICE_TREE="r8a77950-ulcb-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y@@ -87,4 +86,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""lib/Kconfig +0
-5@@ -652,22 +652,6 @@ config GENERATE_SMBIOS_TABLE 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 - default SYS_VENDOR - help
lib/Kconfig config GENERATE_SMBIOS_TABLE · line 669
Quoted 10 lines
lib/Kconfig +0
-10- The board manufacturer to store in SMBIOS structures. - Change this to override the default one (CONFIG_SYS_VENDOR). - -config SMBIOS_PRODUCT_NAME - string "SMBIOS Product Name" - depends on GENERATE_SMBIOS_TABLE - default SYS_BOARD - help - The product name to store in SMBIOS structures. - Change this to override the default one (CONFIG_SYS_BOARD).
It seems you missed my previous comments about x86 default smbios?
lib/Kconfig config GENERATE_SMBIOS_TABLE · line 657
Quoted 4 lines
lib/Kconfig +0
-1- endmenu config ASN1_COMPILER
[snip]
Regards,
Bin
PATCH v5 13/13 smbios: Drop the unused Kconfig options
Hi Bin,
Quoted 213 lines · Bin Meng
Hi Simon,
Quoted 209 lines · Simon Glass
Now that we can use devicetree to specify this information, drop the old CONFIG options.
Signed-off-by Simon Glass <[email protected]>---
Changes in v5:
- Renamesmbios_add_prop_default()tosmbios_add_prop()Changes in v3:
- Add onto the sysinfo bindingconfigs/clearfog_gt_8k_defconfig | 2 -- configs/mt7622_rfb_defconfig | 1 - configs/mvebu_db_armada8k_defconfig | 2 -- configs/r8a774a1_beacon_defconfig | 2 -- configs/r8a77970_eagle_defconfig | 2 -- configs/r8a77980_condor_defconfig | 2 -- configs/r8a77990_ebisu_defconfig | 2 -- configs/r8a77995_draak_defconfig | 2 -- configs/rcar3_salvator-x_defconfig | 2 -- configs/rcar3_ulcb_defconfig | 2 -- lib/Kconfig | 16 ---------- lib/smbios.c | 46 ++++++++--------------------- 12 files changed, 13 insertions(+), 68 deletions(-)configs/clearfog_gt_8k_defconfig +0
-2@@ -12,7 +12,6 @@ CONFIG_DM_GPIO=y CONFIG_DEBUG_UART_BASE=0xf0512000 CONFIG_DEBUG_UART_CLOCK=200000000 CONFIG_DEFAULT_DEVICE_TREE="armada-8040-clearfog-gt-8k" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_DEBUG_UART=y CONFIG_AHCI=y CONFIG_DISTRO_DEFAULTS=y@@ -78,4 +77,3 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y -CONFIG_SMBIOS_MANUFACTURER=""configs/mt7622_rfb_defconfig +0
-1@@ -5,7 +5,6 @@ CONFIG_SYS_TEXT_BASE=0x41e00000 CONFIG_SYS_MALLOC_F_LEN=0x4000 CONFIG_NR_DRAM_BANKS=1 CONFIG_DEFAULT_DEVICE_TREE="mt7622-rfb" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_DEFAULT_FDT_FILE="mt7622-rfb" CONFIG_LOGLEVEL=7configs/mvebu_db_armada8k_defconfig +0
-2@@ -11,7 +11,6 @@ CONFIG_ENV_SECT_SIZE=0x10000 CONFIG_DEBUG_UART_BASE=0xf0512000 CONFIG_DEBUG_UART_CLOCK=200000000 CONFIG_DEFAULT_DEVICE_TREE="armada-8040-db" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_DEBUG_UART=y CONFIG_AHCI=y CONFIG_DISTRO_DEFAULTS=y@@ -72,4 +71,3 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y -CONFIG_SMBIOS_MANUFACTURER=""configs/r8a774a1_beacon_defconfig +0
-2@@ -8,7 +8,6 @@ CONFIG_RCAR_GEN3=y CONFIG_TARGET_BEACON_RZG2M=y # CONFIG_SPL is not set CONFIG_DEFAULT_DEVICE_TREE="r8a774a1-beacon-rzg2m-kit" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y # CONFIG_ARCH_FIXUP_FDT_MEMORY is not set@@ -64,4 +63,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""configs/r8a77970_eagle_defconfig +0
-2@@ -11,7 +11,6 @@ CONFIG_SPL_TEXT_BASE=0xe6318000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_EAGLE=y CONFIG_DEFAULT_DEVICE_TREE="r8a77970-eagle-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y@@ -74,4 +73,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""configs/r8a77980_condor_defconfig +0
-2@@ -11,7 +11,6 @@ CONFIG_SPL_TEXT_BASE=0xe6318000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_CONDOR=y CONFIG_DEFAULT_DEVICE_TREE="r8a77980-condor-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y@@ -75,4 +74,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""configs/r8a77990_ebisu_defconfig +0
-2@@ -10,7 +10,6 @@ CONFIG_SPL_TEXT_BASE=0xe6318000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_EBISU=y CONFIG_DEFAULT_DEVICE_TREE="r8a77990-ebisu-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y@@ -84,4 +83,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""configs/r8a77995_draak_defconfig +0
-2@@ -10,7 +10,6 @@ CONFIG_SPL_TEXT_BASE=0xe6318000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_DRAAK=y CONFIG_DEFAULT_DEVICE_TREE="r8a77995-draak-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y@@ -85,4 +84,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""configs/rcar3_salvator-x_defconfig +0
-2@@ -9,7 +9,6 @@ CONFIG_SPL_TEXT_BASE=0xe6338000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_SALVATOR_X=y CONFIG_DEFAULT_DEVICE_TREE="r8a77950-salvator-x-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y@@ -89,4 +88,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""configs/rcar3_ulcb_defconfig +0
-2@@ -10,7 +10,6 @@ CONFIG_SPL_TEXT_BASE=0xe6338000 CONFIG_RCAR_GEN3=y CONFIG_TARGET_ULCB=y CONFIG_DEFAULT_DEVICE_TREE="r8a77950-ulcb-u-boot" -CONFIG_SMBIOS_PRODUCT_NAME="" CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y@@ -87,4 +86,3 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y -CONFIG_SMBIOS_MANUFACTURER=""lib/Kconfig +0
-9@@ -652,22 +652,6 @@ config GENERATE_SMBIOS_TABLE 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 - default SYS_VENDOR - help - The board manufacturer to store in SMBIOS structures. - Change this to override the default one (CONFIG_SYS_VENDOR). - -config SMBIOS_PRODUCT_NAME
Quoted 8 lines
lib/Kconfig config GENERATE_SMBIOS_TABLE · line 669
Quoted 6 lines
lib/Kconfig +0
-6- string "SMBIOS Product Name" - depends on GENERATE_SMBIOS_TABLE - default SYS_BOARD - help - The product name to store in SMBIOS structures. - Change this to override the default one (CONFIG_SYS_BOARD).It seems you missed my previous comments about x86 default smbios?
Yes I saw it but didn't get to it yet. I'll add it as a new patch in v6.
REgards,
Simon