lenovo/x201 & x230: Add EC info to SMBIOS.

Based on X60 counterpart.

Change-Id: I1556f75db08edf47c9313dae91072335240d46ad
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/4780
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
Vladimir Serbinenko 2014-01-23 09:06:50 +01:00
parent 0f92f63055
commit 91175bb493
2 changed files with 32 additions and 2 deletions

View File

@ -154,12 +154,27 @@ static void mainboard_init(device_t dev)
0x42, 0x142); 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;
}
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
device_t dev0; device_t dev0;
u16 pmbase; u16 pmbase;
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
dev->ops->get_smbios_data = mainboard_smbios_data;
pmbase = pci_read_config32(dev_find_slot(0, PCI_DEVFN(0x1f, 0)), pmbase = pci_read_config32(dev_find_slot(0, PCI_DEVFN(0x1f, 0)),
PMBASE) & 0xff80; PMBASE) & 0xff80;

View File

@ -39,6 +39,7 @@
#include <device/pci.h> #include <device/pci.h>
#include <cbfs.h> #include <cbfs.h>
#include <pc80/keyboard.h> #include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h>
#include <build.h> #include <build.h>
void mainboard_suspend_resume(void) void mainboard_suspend_resume(void)
@ -182,12 +183,28 @@ static void mainboard_init(device_t dev)
0x42, 0x142); 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 // mainboard_enable is executed as first thing after
// enumerate_buses(). // enumerate_buses().
static void mainboard_enable(device_t dev) static void mainboard_enable(device_t dev)
{ {
dev->ops->init = mainboard_init; dev->ops->init = mainboard_init;
dev->ops->get_smbios_data = mainboard_smbios_data;
#if CONFIG_VGA_ROM_RUN #if CONFIG_VGA_ROM_RUN
/* Install custom int15 handler for VGA OPROM */ /* Install custom int15 handler for VGA OPROM */
mainboard_interrupt_handlers(0x15, &int15_handler); mainboard_interrupt_handlers(0x15, &int15_handler);
@ -195,8 +212,6 @@ static void mainboard_enable(device_t dev)
verb_setup(); verb_setup();
} }
void h8_mainboard_init_dock (void);
void h8_mainboard_init_dock (void) void h8_mainboard_init_dock (void)
{ {
} }