Hung-Te Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/51405 )
Change subject: mb/google/asurada: get SKU ID from AP strapping pins ......................................................................
mb/google/asurada: get SKU ID from AP strapping pins
The SKU ID for Asurada should come from AP ADC channel 5 and 6.
BUG=None TEST=make; boots on asurada
Change-Id: I6a00c555f20aca4cd7f8bcee46ee81c17ef6ca3c Signed-off-by: Hung-Te Lin hungte@chromium.org --- M src/mainboard/google/asurada/boardid.c 1 file changed, 12 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/51405/1
diff --git a/src/mainboard/google/asurada/boardid.c b/src/mainboard/google/asurada/boardid.c index 06c21ec..33f71a9 100644 --- a/src/mainboard/google/asurada/boardid.c +++ b/src/mainboard/google/asurada/boardid.c @@ -12,6 +12,9 @@ enum { RAM_ID_HIGH_CHANNEL = 4, RAM_ID_LOW_CHANNEL = 3, + + SKU_ID_HIGH_CHANNEL = 6, + SKU_ID_LOW_CHANNEL = 5, };
static const unsigned int ram_voltages[ADC_LEVELS] = { @@ -58,7 +61,15 @@
uint32_t sku_id(void) { - return 0; + static uint32_t cached_sku_code = BOARD_ID_INIT; + + if (cached_sku_code == BOARD_ID_INIT) { + cached_sku_code = (get_adc_index(SKU_ID_HIGH_CHANNEL) << 4 | + get_adc_index(SKU_ID_LOW_CHANNEL)); + printk(BIOS_DEBUG, "SKU Code: %#02x\n", cached_sku_code); + } + + return cached_sku_code; }
uint32_t ram_code(void)