<stdio.h> header is used for input/output operations (such as printf, scanf, fopen, etc.). Although some input/output functions can manipulate strings, they do not need to directly include <string.h> because they are declared independently. Change-Id: Ibe2a4ff6f68843a6d99cfdfe182cf2dd922802aa Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82665 Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
35 lines
672 B
C
35 lines
672 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
#include <baseboard/gpio.h>
|
|
#include <baseboard/variants.h>
|
|
#include <device/device.h>
|
|
#include <ec/ec.h>
|
|
#include <soc/gpio.h>
|
|
#include <smbios.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
const char *smbios_system_sku(void)
|
|
{
|
|
static char sku_str[7] = ""; /* sku{0..255} */
|
|
uint32_t sku_id = 255;
|
|
|
|
snprintf(sku_str, sizeof(sku_str), "sku%u", sku_id);
|
|
return sku_str;
|
|
}
|
|
|
|
static void mainboard_init(void *chip_info)
|
|
{
|
|
const struct pad_config *pads;
|
|
size_t num;
|
|
|
|
pads = variant_gpio_table(&num);
|
|
gpio_configure_pads(pads, num);
|
|
|
|
mainboard_ec_init();
|
|
}
|
|
|
|
struct chip_operations mainboard_ops = {
|
|
.init = mainboard_init,
|
|
};
|