From 2237324e77a5e8ed30878609095c1592081f15e4 Mon Sep 17 00:00:00 2001 From: Trevor Mosey Date: Fri, 2 May 2014 20:07:03 -0500 Subject: lenovo/t60: Add "IBM ThinkPad Embedded Controller" SMBIOS OEM String MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit linux/drivers/platform/x86/thinkpad_acpi.c looks for an EC version string before loading, this code copies the vendor BIOS by exposing this string. This was originally part of x60's mainboard.c Change-Id: I5e54ea2833252bc4dbba46ceb67d78c435b34845 Signed-off-by: Trevor Mosey Reviewed-on: http://review.coreboot.org/5638 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/mainboard/lenovo/t60/mainboard.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/mainboard/lenovo/t60/mainboard.c b/src/mainboard/lenovo/t60/mainboard.c index 623031a77f..a25c92c7f6 100644 --- a/src/mainboard/lenovo/t60/mainboard.c +++ b/src/mainboard/lenovo/t60/mainboard.c @@ -33,6 +33,7 @@ #include #include #include +#include static acpi_cstate_t cst_entries[] = { { 1, 1, 1000, { 0x7f, 1, 2, { 0 }, 1, 0 } }, @@ -78,9 +79,24 @@ static void mainboard_init(device_t dev) ec_write(0x0c, inb(0x164c) & 8 ? 0x89 : 0x09); } +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; +} + static void mainboard_enable(device_t dev) { dev->ops->init = mainboard_init; + dev->ops->get_smbios_data = mainboard_smbios_data; } struct chip_operations mainboard_ops = { -- cgit v1.2.3