[coreboot-gerrit] Change in coreboot[master]: mb/google/sarien: Add sku_id function

Duncan Laurie (Code Review) gerrit at coreboot.org
Tue Nov 6 00:43:45 CET 2018


Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/29486


Change subject: mb/google/sarien: Add sku_id function
......................................................................

mb/google/sarien: Add sku_id function

This change adds a sku_id() function that returns a static value to
differentiate the sarien and arcada boards.

Change-Id: I1fecc675573a6aece7188aae9370733068d45dbf
Signed-off-by: Duncan Laurie <dlaurie at google.com>
---
M src/mainboard/google/sarien/Makefile.inc
A src/mainboard/google/sarien/sku.c
A src/mainboard/google/sarien/variants/arcada/include/variant/variant.h
A src/mainboard/google/sarien/variants/sarien/include/variant/variant.h
4 files changed, 67 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/29486/1

diff --git a/src/mainboard/google/sarien/Makefile.inc b/src/mainboard/google/sarien/Makefile.inc
index 3370900..085fee6 100644
--- a/src/mainboard/google/sarien/Makefile.inc
+++ b/src/mainboard/google/sarien/Makefile.inc
@@ -16,6 +16,7 @@
 bootblock-y += bootblock.c
 
 ramstage-y += ramstage.c
+ramstage-y += sku.c
 
 romstage-y += romstage.c
 
diff --git a/src/mainboard/google/sarien/sku.c b/src/mainboard/google/sarien/sku.c
new file mode 100644
index 0000000..9fc61a3
--- /dev/null
+++ b/src/mainboard/google/sarien/sku.c
@@ -0,0 +1,22 @@
+/*
+ * 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 <boardid.h>
+#include <variant/variant.h>
+
+uint32_t sku_id(void)
+{
+	return VARIANT_SKU_ID;
+}
diff --git a/src/mainboard/google/sarien/variants/arcada/include/variant/variant.h b/src/mainboard/google/sarien/variants/arcada/include/variant/variant.h
new file mode 100644
index 0000000..f1e551a
--- /dev/null
+++ b/src/mainboard/google/sarien/variants/arcada/include/variant/variant.h
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+#ifndef VARIANT_H
+#define VARIANT_H
+
+/* Arcada is SKU ID 2 */
+#define VARIANT_SKU_ID	2
+
+#endif
diff --git a/src/mainboard/google/sarien/variants/sarien/include/variant/variant.h b/src/mainboard/google/sarien/variants/sarien/include/variant/variant.h
new file mode 100644
index 0000000..d0be7fc
--- /dev/null
+++ b/src/mainboard/google/sarien/variants/sarien/include/variant/variant.h
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+#ifndef VARIANT_H
+#define VARIANT_H
+
+/* Sarien is SKU ID 1 */
+#define VARIANT_SKU_ID	1
+
+#endif

-- 
To view, visit https://review.coreboot.org/29486
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fecc675573a6aece7188aae9370733068d45dbf
Gerrit-Change-Number: 29486
Gerrit-PatchSet: 1
Gerrit-Owner: Duncan Laurie <dlaurie at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181105/dd27d203/attachment-0001.html>


More information about the coreboot-gerrit mailing list