summaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-08-27 23:42:45 +0200
committerVladimir Serbinenko <phcoder@gmail.com>2014-08-30 20:47:16 +0200
commit6abb33c7ba5f18ec3e3578cb1f804cbe60e49c49 (patch)
treee8f1d51157d3c402e6b5a3c78727ed353d52b26a /src/ec
parent8603513540f2d0016546db7e03292d4d70424b00 (diff)
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 <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/6788 Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/lenovo/h8/h8.c18
1 files changed, 17 insertions, 1 deletions
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 <kconfig.h>
#include <stdlib.h>
#include <string.h>
+#include <smbios.h>
#include <pc80/mc146818rtc.h>
#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,
};