diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2014-10-13 13:12:38 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-04-04 12:39:55 +0200 |
commit | 82833446b6e0878a43fbe7f0014bdf00f6f241db (patch) | |
tree | b7aca66c1dc3790071febf56c32541f136a70377 | |
parent | 0b92a5e6076dfc9c03140ad61c0f9588a85b2e41 (diff) |
samus: Add smbios_mainboard_version to define board version
Instead of having this in mosys just have coreboot report the
board version in SMBIOS tables.
BUG=chrome-os-partner:32359
BRANCH=samus
TEST=build and boot on samus, check /sys/class/dmi/id/product_version
Change-Id: I09d235752f4c870f99fb8c6a280e2bf9aba7e137
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Original-Commit-Id: 08413589ba84b07ff64c9116ca5fcc991cee3b89
Original-Change-Id: Ib851d2e79ed721dcbc1c2f2eda6da50cac064cf3
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/223096
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/9263
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
-rw-r--r-- | src/mainboard/google/samus/ec.h | 4 | ||||
-rw-r--r-- | src/mainboard/google/samus/mainboard.c | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/mainboard/google/samus/ec.h b/src/mainboard/google/samus/ec.h index 1ba16777ce..295d04001f 100644 --- a/src/mainboard/google/samus/ec.h +++ b/src/mainboard/google/samus/ec.h @@ -22,6 +22,10 @@ #include <ec/google/chromeec/ec_commands.h> +#define SAMUS_EC_BOARD_VERSION_EVT 3 +#define SAMUS_EC_BOARD_VERSION_EVT2 4 +#define SAMUS_EC_BOARD_VERSION_EVT3 5 + #define EC_SCI_GPI 36 /* GPIO36 is EC_SCI# */ #define EC_SMI_GPI 34 /* GPIO34 is EC_SMI# */ diff --git a/src/mainboard/google/samus/mainboard.c b/src/mainboard/google/samus/mainboard.c index 89303b9017..85e9dfbbee 100644 --- a/src/mainboard/google/samus/mainboard.c +++ b/src/mainboard/google/samus/mainboard.c @@ -32,12 +32,26 @@ #include <arch/io.h> #include <arch/interrupt.h> #include <boot/coreboot_tables.h> +#include <ec/google/chromeec/ec.h> #include "ec.h" void mainboard_suspend_resume(void) { } +const char *smbios_mainboard_version(void) +{ + switch (google_chromeec_get_board_version()) { + case SAMUS_EC_BOARD_VERSION_EVT: + return "EVT"; + case SAMUS_EC_BOARD_VERSION_EVT2: + return "EVT2"; + case SAMUS_EC_BOARD_VERSION_EVT3: + return "EVT3"; + } + return "Unknown"; +} + static void mainboard_init(device_t dev) { mainboard_ec_init(); |