| 1 |
|
| 2 |
|
| 3 |
#include <ec/google/chromeec/ec.h> |
| 4 |
#include <baseboard/variants.h> |
| 5 |
#include <boardid.h> |
| 6 |
#include <cbfs.h> |
| 7 |
#include <gpio.h> |
| 8 |
#include <smbios.h> |
| 9 |
#include <variant/gpio.h> |
| 10 |
|
| 11 |
uint32_t sku_id(void) |
| 12 |
{ |
| 13 |
static int sku = -1; |
| 14 |
|
| 15 |
if (sku == -1) |
| 16 |
sku = google_chromeec_get_sku_id(); |
| 17 |
|
| 18 |
return sku; |
| 19 |
} |
| 20 |
|
| 21 |
uint8_t variant_board_sku(void) |
| 22 |
{ |
| 23 |
return sku_id(); |
| 24 |
} |
| 25 |
|
| 26 |
void variant_mainboard_suspend_resume(void) |
| 27 |
{ |
| 28 |
|
| 29 |
gpio_set(GPIO_133, 0); |
| 30 |
} |
| 31 |
|
| 32 |
const char *smbios_mainboard_manufacturer(void) |
| 33 |
{ |
| 34 |
static char oem_bin_data[11]; |
| 35 |
static const char *manuf; |
| 36 |
|
| 37 |
if (!CONFIG(USE_OEM_BIN)) |
| 38 |
return CONFIG_MAINBOARD_SMBIOS_MANUFACTURER; |
| 39 |
|
| 40 |
if (manuf) |
| 41 |
return manuf; |
| 42 |
|
| 43 |
if (cbfs_load("oem.bin", oem_bin_data, sizeof(oem_bin_data) - 1)) |
| 44 |
manuf = &oem_bin_data[0]; |
| 45 |
else |
| 46 |
manuf = CONFIG_MAINBOARD_SMBIOS_MANUFACTURER; |
| 47 |
|
| 48 |
return manuf; |
| 49 |
} |