aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/kahlee/variants/grunt
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-03-05 12:18:40 -0700
committerMartin Roth <martinroth@google.com>2018-03-08 16:43:57 +0000
commitb5c5177bc478a789b51abe73146d2d3027da4fde (patch)
treeb22eedcc2896b76620817c7eef3482821db22594 /src/mainboard/google/kahlee/variants/grunt
parentf393d43b97b83de500feaddcca52f02f9ecf1ceb (diff)
mb/google/kahlee: Add SKU support
We want to report the board SKU via the SMBIOS tables. Add support for this, obtaining the ID itself from the EC. BUG=b:74175244 BRANCH=none TEST=manually on grunt with another CL: mosys platform sku 0 Change-Id: I9e08d64df3f89d3703de047dd9ec8e1717e6b212 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://review.coreboot.org/25011 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/mainboard/google/kahlee/variants/grunt')
-rw-r--r--src/mainboard/google/kahlee/variants/grunt/Makefile.inc2
-rw-r--r--src/mainboard/google/kahlee/variants/grunt/mainboard.c27
2 files changed, 29 insertions, 0 deletions
diff --git a/src/mainboard/google/kahlee/variants/grunt/Makefile.inc b/src/mainboard/google/kahlee/variants/grunt/Makefile.inc
index 319ff13b77..7a4b9940df 100644
--- a/src/mainboard/google/kahlee/variants/grunt/Makefile.inc
+++ b/src/mainboard/google/kahlee/variants/grunt/Makefile.inc
@@ -14,3 +14,5 @@
#
subdirs-y += spd
+
+ramstage-y += mainboard.c
diff --git a/src/mainboard/google/kahlee/variants/grunt/mainboard.c b/src/mainboard/google/kahlee/variants/grunt/mainboard.c
new file mode 100644
index 0000000000..c873299bf1
--- /dev/null
+++ b/src/mainboard/google/kahlee/variants/grunt/mainboard.c
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <ec/google/chromeec/ec.h>
+#include <baseboard/variants.h>
+
+uint8_t variant_board_sku(void)
+{
+ static int sku = -1;
+
+ if (sku == -1)
+ sku = google_chromeec_get_sku_id();
+
+ return sku;
+}