]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
smbios: Drop the unused Kconfig options
authorSimon Glass <sjg@chromium.org>
Thu, 5 Nov 2020 13:32:18 +0000 (06:32 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Fri, 6 Nov 2020 02:26:32 +0000 (10:26 +0800)
Now that we can use devicetree to specify this information, drop the old
CONFIG options.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
12 files changed:
configs/clearfog_gt_8k_defconfig
configs/mt7622_rfb_defconfig
configs/mvebu_db_armada8k_defconfig
configs/r8a774a1_beacon_defconfig
configs/r8a77970_eagle_defconfig
configs/r8a77980_condor_defconfig
configs/r8a77990_ebisu_defconfig
configs/r8a77995_draak_defconfig
configs/rcar3_salvator-x_defconfig
configs/rcar3_ulcb_defconfig
lib/Kconfig
lib/smbios.c

index 552df3a8b806aa77e8824802136853f558ddb9e1..9bb1f212a705644a591498f5137b21ec4b321ba7 100644 (file)
@@ -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=""
index a6089d6cf6ad4f853af91999e0b2efa308938aca..ccf926e104041ff249e80157ee9a91c70d74423c 100644 (file)
@@ -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
index a88d5cc98bd70a6019a1f527950d58bdcab62c2b..5d8a1b655cd54016ee421da74f7411555e790f14 100644 (file)
@@ -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=""
index 5d564d82c2fffb54e92d47607757ced54d4369bb..2f45edd92ec5f3176a53371f731aa494fbb8c932 100644 (file)
@@ -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=""
index a7774842353ca69a2624881b0b6250a313560bf0..9dbe0e1d5b481f1bedf01f19c1f51272c75b4088 100644 (file)
@@ -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=""
index 4e457234ed0cdfcfbf6438bf5c367e3fed031c95..dbe2912779cbf4f42a97429ab93106c627af87b4 100644 (file)
@@ -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=""
index 4667284bb3719485666d9e981e7a3ee70c5404c9..cb75b5c3a60396f511d15dd19a358b7a6ee18e81 100644 (file)
@@ -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=""
index 5cc0f608da20892c8b48bffa475da4d6aeedeca0..46a7314fa90a3f6e8120853332067c9168510f66 100644 (file)
@@ -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=""
index 5f2f366554477337fa24b4ce4a1ca9b2b0fd549d..ff6e0e945e6366a3f7fc1f5cc3bc8633e9355cbd 100644 (file)
@@ -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=""
index 03865dfc34a7f43c6e87eb85abe4b6054e0664c8..df202a7598342bd0aebc3e75671cfe280bb470a7 100644 (file)
@@ -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=""
index fdc35a923220cb4cae772113f714613140223567..7673d2e4e0486e540c02408a15adb22e490a2432 100644 (file)
@@ -661,22 +661,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
index a52a9d5b307725b012bb5541e85e27c531d577b8..485a812c77685742a4098dadc83f0ea6b14ccdba 100644 (file)
@@ -65,42 +65,27 @@ static int smbios_add_string(char *start, const char *str)
 }
 
 /**
- * smbios_add_prop_default() - Add a property from the device tree or default
+ * 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
- * @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)
+static int smbios_add_prop(char *start, ofnode node, const char *prop)
 {
-       const char *str = NULL;
 
-       if (IS_ENABLED(CONFIG_OF_CONTROL))
+       if (IS_ENABLED(CONFIG_OF_CONTROL)) {
+               const char *str;
+
                str = ofnode_read_string(node, prop);
-       if (str)
-               return smbios_add_string(start, str);
-       else if (def)
-               return smbios_add_string(start, def);
+               if (str)
+                       return smbios_add_string(start, str);
+       }
 
        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
  *
@@ -169,10 +154,8 @@ 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_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->manufacturer = smbios_add_prop(t->eos, node, "manufacturer");
+       t->product_name = smbios_add_prop(t->eos, node, "product");
        t->version = smbios_add_prop(t->eos, node, "version");
        if (serial_str) {
                t->serial_number = smbios_add_string(t->eos, serial_str);
@@ -198,10 +181,8 @@ 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_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->manufacturer = smbios_add_prop(t->eos, node, "manufacturer");
+       t->product_name = smbios_add_prop(t->eos, node, "product");
        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;
@@ -221,8 +202,7 @@ 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_prop_default(t->eos, node, "manufacturer",
-                                                 CONFIG_SMBIOS_MANUFACTURER);
+       t->manufacturer = smbios_add_prop(t->eos, node, "manufacturer");
        t->chassis_type = SMBIOS_ENCLOSURE_DESKTOP;
        t->bootup_state = SMBIOS_STATE_SAFE;
        t->power_supply_state = SMBIOS_STATE_SAFE;