drivers/uart: Replace 'unsigned long int' by 'unsigned long'
[coreboot2.git] / src / ec / google / chromeec / ec_smbios.c
blob5205ed30acce1055bfd5e779ece0704555e0be3f
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <ec/google/chromeec/ec.h>
4 #include <console/console.h>
5 #include <stdio.h>
6 #include <string.h>
7 #include <smbios.h>
9 const char *google_chromeec_smbios_system_sku(void)
11 static char sku_str[14]; /* sku{0..2147483647} */
12 uint32_t sku_id = google_chromeec_get_board_sku();
13 snprintf(sku_str, sizeof(sku_str), "sku%u", sku_id);
14 return sku_str;
17 const char *smbios_system_sku(void)
19 return google_chromeec_smbios_system_sku();
22 const char *smbios_mainboard_manufacturer(void)
24 static char oem_name[32];
25 static const char *manuf;
27 if (manuf)
28 return manuf;
30 manuf = CONFIG_MAINBOARD_SMBIOS_MANUFACTURER;
31 if (google_chromeec_cbi_get_oem_name(&oem_name[0], ARRAY_SIZE(oem_name)) < 0)
32 printk(BIOS_INFO, "Couldn't obtain OEM name from CBI\n");
33 else if (strlen(oem_name) > 0)
34 manuf = &oem_name[0];
35 else
36 printk(BIOS_INFO, "OEM name from CBI is empty, use default\n");
38 return manuf;
41 const char *smbios_system_manufacturer(void)
43 return "Google";