summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorNicolas Reinecke <nr@das-labor.org>2015-01-28 11:38:44 +0100
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-01-31 07:18:46 +0100
commit5ecc6bc7d696ddcc3c3f440f7bb20edfb9316b03 (patch)
treef3db40e5cb24f868638d41064531170982264df8 /src/mainboard
parent96643455864a961881a3b2c4922ea76c3a5b4d20 (diff)
lenovo/t5x0: Make version look like something thinkpad_acpi would accept
thinkpad_acpi checks that BIOS version matches some pattern. Report version in this form. same as http://review.coreboot.org/4650 / 63acd22dc5366c72a7165138f5030df9523824dc Change-Id: I82d7a2b9f2ec56557b3a9c26d1af57ed39e31850 Signed-off-by: Nicolas Reinecke <nr@das-labor.org> Reviewed-on: http://review.coreboot.org/8302 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese <zaolin@das-labor.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/lenovo/t520/mainboard.c13
-rw-r--r--src/mainboard/lenovo/t530/mainboard.c13
2 files changed, 26 insertions, 0 deletions
diff --git a/src/mainboard/lenovo/t520/mainboard.c b/src/mainboard/lenovo/t520/mainboard.c
index 582ef8166d..8419abca10 100644
--- a/src/mainboard/lenovo/t520/mainboard.c
+++ b/src/mainboard/lenovo/t520/mainboard.c
@@ -37,6 +37,7 @@
#include <cbfs.h>
#include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h>
+#include <version.h>
void mainboard_suspend_resume(void)
{
@@ -44,7 +45,19 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2);
}
+const char *smbios_mainboard_bios_version(void)
+{
+ static char *s = NULL;
+
+ /* Satisfy thinkpad_acpi. */
+ if (strlen(CONFIG_LOCALVERSION))
+ return "CBET4000 " CONFIG_LOCALVERSION;
+ if (s != NULL)
+ return s;
+ s = strconcat("CBET4000 ", coreboot_version);
+ return s;
+}
static void mainboard_init(device_t dev)
{
diff --git a/src/mainboard/lenovo/t530/mainboard.c b/src/mainboard/lenovo/t530/mainboard.c
index 14e19604b8..072ebe94a4 100644
--- a/src/mainboard/lenovo/t530/mainboard.c
+++ b/src/mainboard/lenovo/t530/mainboard.c
@@ -37,6 +37,7 @@
#include <cbfs.h>
#include <pc80/keyboard.h>
#include <ec/lenovo/h8/h8.h>
+#include <version.h>
void mainboard_suspend_resume(void)
{
@@ -44,7 +45,19 @@ void mainboard_suspend_resume(void)
outb(0xcb, 0xb2);
}
+const char *smbios_mainboard_bios_version(void)
+{
+ static char *s = NULL;
+
+ /* Satisfy thinkpad_acpi. */
+ if (strlen(CONFIG_LOCALVERSION))
+ return "CBET4000 " CONFIG_LOCALVERSION;
+ if (s != NULL)
+ return s;
+ s = strconcat("CBET4000 ", coreboot_version);
+ return s;
+}
static void mainboard_init(device_t dev)
{