Stefan Reinauer (stefan.reinauer@coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9263
-gerrit
commit 6f49d203d751b487a2410a95a8dece7b1257500b Author: Duncan Laurie dlaurie@chromium.org Date: Mon Oct 13 13:12:38 2014 -0700
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 --- src/mainboard/google/samus/ec.h | 4 ++++ src/mainboard/google/samus/mainboard.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+)
diff --git a/src/mainboard/google/samus/ec.h b/src/mainboard/google/samus/ec.h index 1ba1677..295d040 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 89303b9..85e9dfb 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();