[coreboot-gerrit] Change in coreboot[master]: mb/google/reef: Cache EC's SKU ID on Coral
Patrick Georgi (Code Review)
gerrit at coreboot.org
Thu Sep 28 18:02:17 CEST 2017
Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/21737
Change subject: mb/google/reef: Cache EC's SKU ID on Coral
......................................................................
mb/google/reef: Cache EC's SKU ID on Coral
Change-Id: I1925f51d63290b8d08366b622d5df3aab3a7484e
Signed-off-by: Patrick Georgi <pgeorgi at google.com>
---
M src/mainboard/google/reef/variants/coral/mainboard.c
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/21737/1
diff --git a/src/mainboard/google/reef/variants/coral/mainboard.c b/src/mainboard/google/reef/variants/coral/mainboard.c
index 1abfa0a..35a635d 100644
--- a/src/mainboard/google/reef/variants/coral/mainboard.c
+++ b/src/mainboard/google/reef/variants/coral/mainboard.c
@@ -31,8 +31,12 @@
uint8_t variant_board_sku(void)
{
- // we know that the values are in 0..255
- return google_chromeec_get_sku_id();
+ static int sku = -1;
+
+ if (sku == -1)
+ sku = google_chromeec_get_sku_id();
+
+ return sku;
}
void variant_nhlt_oem_overrides(const char **oem_id,
--
To view, visit https://review.coreboot.org/21737
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1925f51d63290b8d08366b622d5df3aab3a7484e
Gerrit-Change-Number: 21737
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170928/671297c4/attachment.html>
More information about the coreboot-gerrit
mailing list