summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/storm/boardid.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mainboard/google/storm/boardid.c b/src/mainboard/google/storm/boardid.c
index 6d7a918088..683b5f4812 100644
--- a/src/mainboard/google/storm/boardid.c
+++ b/src/mainboard/google/storm/boardid.c
@@ -37,7 +37,9 @@
* revision.
*/
-uint8_t board_id(void)
+static int board_id_value = -1;
+
+static uint8_t get_board_id(void)
{
uint8_t bid;
gpio_t hw_rev_gpios[] = {29, 30, 68};
@@ -50,3 +52,11 @@ uint8_t board_id(void)
return bid;
}
+
+uint8_t board_id(void)
+{
+ if (board_id_value < 0)
+ board_id_value = get_board_id();
+
+ return board_id_value;
+}