From 6abb33c7ba5f18ec3e3578cb1f804cbe60e49c49 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Wed, 27 Aug 2014 23:42:45 +0200 Subject: smbios: reorganise OEM strings handling. OEM strings should not be handled by mobo code but by common code with strings collected from all devices. Change-Id: Ibde61a1ca79845670bc0df87dc6c67fa868d48a9 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/6788 Reviewed-by: Edward O'Callaghan Tested-by: build bot (Jenkins) --- src/ec/lenovo/h8/h8.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/ec/lenovo/h8') diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index e70c0e8ed0..79ef3cdeeb 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "h8.h" @@ -166,12 +167,27 @@ u8 h8_build_id_and_function_spec_version(char *buf, u8 buf_len) return i; } +static void h8_smbios_strings(device_t dev, struct smbios_type11 *t) +{ + char tpec[] = "IBM ThinkPad Embedded Controller -[ ]-"; + + h8_build_id_and_function_spec_version(tpec + 35, 17); + + t->count = smbios_add_string(t->eos, tpec); +} + +struct device_operations h8_dev_ops = { + .get_smbios_strings = h8_smbios_strings +}; + static void h8_enable(device_t dev) { struct ec_lenovo_h8_config *conf = dev->chip_info; u8 val, tmp; u8 beepmask0, beepmask1, config1; + dev->ops = &h8_dev_ops; + h8_log_ec_version(); ec_write(H8_CONFIG0, conf->config0); @@ -279,5 +295,5 @@ static void h8_enable(device_t dev) struct chip_operations ec_lenovo_h8_ops = { CHIP_NAME("Lenovo H8 EC") - .enable_dev = h8_enable + .enable_dev = h8_enable, }; -- cgit v1.2.3