From 7e11dcb5107982e1c596d0291f25eb01507c8d5c Mon Sep 17 00:00:00 2001 From: Bo-Chen Chen Date: Thu, 1 Dec 2022 16:34:04 +0800 Subject: mb/google/geralt: Correct auxadc channel for SKU ID According to ID table(go/geralt-id), geralt only uses channel 4 for SKU ID. BUG=b:244208960 TEST=emerge-geralt coreboot Change-Id: I0f7303b8809e6000e3e16228b00b525a77feee87 Signed-off-by: Bo-Chen Chen Reviewed-on: https://review.coreboot.org/c/coreboot/+/70401 Reviewed-by: Yidi Lin Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) --- src/mainboard/google/geralt/boardid.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/mainboard/google/geralt/boardid.c b/src/mainboard/google/geralt/boardid.c index 96031ef408..24ea438e40 100644 --- a/src/mainboard/google/geralt/boardid.c +++ b/src/mainboard/google/geralt/boardid.c @@ -14,9 +14,8 @@ enum { /* RAM IDs */ RAM_ID_LOW_CHANNEL = 2, RAM_ID_HIGH_CHANNEL = 3, - /* SKU IDs */ - SKU_ID_LOW_CHANNEL = 4, - SKU_ID_HIGH_CHANNEL = 5, + /* SKU ID */ + SKU_ID_CHANNEL = 4, }; static const unsigned int ram_voltages[ADC_LEVELS] = { @@ -38,8 +37,7 @@ static const unsigned int ram_voltages[ADC_LEVELS] = { static const unsigned int *adc_voltages[] = { [RAM_ID_LOW_CHANNEL] = ram_voltages, [RAM_ID_HIGH_CHANNEL] = ram_voltages, - [SKU_ID_LOW_CHANNEL] = ram_voltages, - [SKU_ID_HIGH_CHANNEL] = ram_voltages, + [SKU_ID_CHANNEL] = ram_voltages, }; static uint32_t get_adc_index(unsigned int channel) @@ -69,8 +67,7 @@ uint32_t sku_id(void) if (cached_sku_code == CROS_SKU_UNKNOWN) { printk(BIOS_WARNING, "Failed to get SKU code from EC\n"); - cached_sku_code = (get_adc_index(SKU_ID_HIGH_CHANNEL) << 4 | - get_adc_index(SKU_ID_LOW_CHANNEL)); + cached_sku_code = get_adc_index(SKU_ID_CHANNEL); } printk(BIOS_DEBUG, "SKU Code: %#02x\n", cached_sku_code); } -- cgit v1.2.3