flapjack: use sku_id 0 for un-provisioned board
Instead of using 2, 0 is now used for non-CBI provisioned board or corrupted CBI board to confrom to the sku encoding. BUG=b:123676982 BRANCH=kukui TEST=test with un-provisioned board to verify the sku_id. Signed-off-by: YH Lin <yueherngl@google.com> Change-Id: I66f29f8a46cd774b40354def7d3623ec44cb96ce Reviewed-on: https://review.coreboot.org/c/31623 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
e613d704d1
commit
97278939ff
|
@ -19,7 +19,8 @@
|
||||||
#include <ec/google/chromeec/ec.h>
|
#include <ec/google/chromeec/ec.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#define FLAPJACK_UNDEF_SKU_ID 2 /* For all un-provisioned Flapjack boards */
|
/* For CBI un-provisioned/corrupted Flapjack board. */
|
||||||
|
#define FLAPJACK_UNDEF_SKU_ID 0
|
||||||
|
|
||||||
static uint32_t get_index(unsigned int channel, uint32_t *cached_id)
|
static uint32_t get_index(unsigned int channel, uint32_t *cached_id)
|
||||||
{
|
{
|
||||||
|
@ -67,7 +68,7 @@ uint32_t sku_id(void)
|
||||||
{
|
{
|
||||||
static uint32_t cached_sku_id = BOARD_ID_INIT;
|
static uint32_t cached_sku_id = BOARD_ID_INIT;
|
||||||
|
|
||||||
/* On Flapjack, getting the SKU via CBI */
|
/* On Flapjack, getting the SKU via CBI. */
|
||||||
if (IS_ENABLED(CONFIG_BOARD_GOOGLE_FLAPJACK)) {
|
if (IS_ENABLED(CONFIG_BOARD_GOOGLE_FLAPJACK)) {
|
||||||
if (cached_sku_id == BOARD_ID_INIT &&
|
if (cached_sku_id == BOARD_ID_INIT &&
|
||||||
google_chromeec_cbi_get_sku_id(&cached_sku_id))
|
google_chromeec_cbi_get_sku_id(&cached_sku_id))
|
||||||
|
|
Loading…
Reference in New Issue