lenovo/t530/mainboard.c: Add EC info to SMBIOS

As is in:
91175bb lenovo/x201 & x230: Add EC info to SMBIOS

This is needed for the Linux driver for the Lenovo's to properly attach.

Change-Id: Ib910b25f392d9d3d6362b6909ce9fd4eeae9a096
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6399
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Edward O'Callaghan 2014-07-29 20:52:17 +10:00
parent 91b1f0b712
commit 251cbd8371
1 changed files with 16 additions and 0 deletions

View File

@ -169,12 +169,28 @@ static void mainboard_init(device_t dev)
0x42, 0x142);
}
static int mainboard_smbios_data(device_t dev, int *handle, unsigned long *current)
{
int len;
char tpec[] = "IBM ThinkPad Embedded Controller -[ ]-";
const char *oem_strings[] = {
tpec,
};
h8_build_id_and_function_spec_version(tpec + 35, 17);
len = smbios_write_type11(current, (*handle)++, oem_strings, ARRAY_SIZE(oem_strings));
return len;
}
// mainboard_enable is executed as first thing after
// enumerate_buses().
static void mainboard_enable(device_t dev)
{
dev->ops->init = mainboard_init;
dev->ops->get_smbios_data = mainboard_smbios_data;
#if CONFIG_VGA_ROM_RUN
/* Install custom int15 handler for VGA OPROM */
mainboard_interrupt_handlers(0x15, &int15_handler);