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@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,