summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2017-09-28 17:59:18 +0200
committerPatrick Georgi <pgeorgi@google.com>2017-10-05 16:35:50 +0000
commit53b8a82e72b74e7598c5344597e014cd5c6fb49e (patch)
tree75cdf19811d7c1414682cacfaa76e4cd4f95f806 /src/mainboard/google
parent0e1ea279d025887c6904b4bb559c7165b44c6dec (diff)
mb/google/reef: Cache EC's SKU ID on Coral
Change-Id: I1925f51d63290b8d08366b622d5df3aab3a7484e Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/21737 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/reef/variants/coral/mainboard.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mainboard/google/reef/variants/coral/mainboard.c b/src/mainboard/google/reef/variants/coral/mainboard.c
index c60c083eac..f2fa30c8fa 100644
--- a/src/mainboard/google/reef/variants/coral/mainboard.c
+++ b/src/mainboard/google/reef/variants/coral/mainboard.c
@@ -26,8 +26,12 @@ enum {
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,