From 3f6e32a4b3d0a9400fd281caab3a737ce97b91d3 Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Thu, 3 Jan 2019 15:22:26 +0800 Subject: [PATCH] google/kukui: Correct boardid init values From `boardid.h`, the uninitialized ID values should be BOARD_ID_INIT instead of BOARD_ID_UNKNOWN. BUG=b:80501386 TEST=make; manually verified on Kukui P1 Change-Id: Ie5267e575e38b92ec64a7317defbd00ee153fa0a Signed-off-by: Hung-Te Lin Reviewed-on: https://review.coreboot.org/c/30618 Tested-by: build bot (Jenkins) Reviewed-by: You-Cheng Syu Reviewed-by: Julius Werner --- src/mainboard/google/kukui/boardid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mainboard/google/kukui/boardid.c b/src/mainboard/google/kukui/boardid.c index 26ae82f3a6..03485dce46 100644 --- a/src/mainboard/google/kukui/boardid.c +++ b/src/mainboard/google/kukui/boardid.c @@ -39,7 +39,7 @@ static uint32_t get_index(unsigned int channel, uint32_t *cached_id) uint32_t id; - if (*cached_id != BOARD_ID_UNKNOWN) + if (*cached_id != BOARD_ID_INIT) return *cached_id; int value = auxadc_get_voltage(channel); @@ -57,12 +57,12 @@ static uint32_t get_index(unsigned int channel, uint32_t *cached_id) uint32_t board_id(void) { - static uint32_t cached_board_id = BOARD_ID_UNKNOWN; + static uint32_t cached_board_id = BOARD_ID_INIT; return get_index(4, &cached_board_id); } uint32_t ram_code(void) { - static uint32_t cached_ram_code = BOARD_ID_UNKNOWN; + static uint32_t cached_ram_code = BOARD_ID_INIT; return get_index(3, &cached_ram_code); }