summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorBo-Chen Chen <rex-bc.chen@mediatek.com>2022-12-01 16:34:04 +0800
committerYu-Ping Wu <yupingso@google.com>2022-12-12 08:26:36 +0000
commit7e11dcb5107982e1c596d0291f25eb01507c8d5c (patch)
tree64cd581dc887d67a2c21e6e50d7e1d882fa1d99b /src/mainboard
parent5aabdf6e12d9fdab614597845e594b0a1b7e3a1b (diff)
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 <rex-bc.chen@mediatek.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70401 Reviewed-by: Yidi Lin <yidilin@google.com> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/geralt/boardid.c11
1 files 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);
}