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 <hungte@chromium.org> Reviewed-on: https://review.coreboot.org/c/30618 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: You-Cheng Syu <youcheng@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
parent
f3e50fc681
commit
3f6e32a4b3
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue