summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/reef/mainboard.c12
-rw-r--r--src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h3
2 files changed, 12 insertions, 3 deletions
diff --git a/src/mainboard/google/reef/mainboard.c b/src/mainboard/google/reef/mainboard.c
index 8c7ec3cc05..3de383a689 100644
--- a/src/mainboard/google/reef/mainboard.c
+++ b/src/mainboard/google/reef/mainboard.c
@@ -52,16 +52,22 @@ static void mainboard_init(void *chip_info)
* a pulldown. This way we can generate 9 different values with the
* 2 pins.
*/
-uint8_t __attribute__((weak)) variant_board_sku(void)
+uint8_t sku_strapping_value(void)
{
- static int board_sku_num = -1;
gpio_t board_sku_gpios[] = {
[1] = GPIO_17, [0] = GPIO_16,
};
const size_t num = ARRAY_SIZE(board_sku_gpios);
+ return gpio_base3_value(board_sku_gpios, num);
+}
+
+uint8_t __attribute__((weak)) variant_board_sku(void)
+{
+ static int board_sku_num = -1;
+
if (board_sku_num < 0)
- board_sku_num = gpio_base3_value(board_sku_gpios, num);
+ board_sku_num = sku_strapping_value();
return board_sku_num;
}
diff --git a/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h
index 535bf34311..13a52f55d0 100644
--- a/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h
@@ -21,6 +21,9 @@
#include <stdint.h>
#include <vendorcode/google/chromeos/chromeos.h>
+/* Return the sku id based off the strapping resistors attached to SoC. */
+uint8_t sku_strapping_value(void);
+
/* Return the board id for the current variant board. */
uint8_t variant_board_id(void);