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>
This commit is contained in:
parent
0b92a5e607
commit
82833446b6
|
@ -22,6 +22,10 @@
|
||||||
|
|
||||||
#include <ec/google/chromeec/ec_commands.h>
|
#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_SCI_GPI 36 /* GPIO36 is EC_SCI# */
|
||||||
#define EC_SMI_GPI 34 /* GPIO34 is EC_SMI# */
|
#define EC_SMI_GPI 34 /* GPIO34 is EC_SMI# */
|
||||||
|
|
||||||
|
|
|
@ -32,12 +32,26 @@
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#include <arch/interrupt.h>
|
#include <arch/interrupt.h>
|
||||||
#include <boot/coreboot_tables.h>
|
#include <boot/coreboot_tables.h>
|
||||||
|
#include <ec/google/chromeec/ec.h>
|
||||||
#include "ec.h"
|
#include "ec.h"
|
||||||
|
|
||||||
void mainboard_suspend_resume(void)
|
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)
|
static void mainboard_init(device_t dev)
|
||||||
{
|
{
|
||||||
mainboard_ec_init();
|
mainboard_ec_init();
|
||||||
|
|
Loading…
Reference in New Issue