mb/google/zork: Add helper function to read DB ID bits in FW_CONFIG

Add helper function variant_get_daughterboard_id() to read
daughterboard id bits (0-3) in firmware configuration table in CBI.

BRANCH=none
BUG=b:162344105,b:152817444
TEST=Check if daughterboard id bits (0-3) can be read from FW_CONFIG.

Signed-off-by: Bhanu Prakash Maiya <bhanumaiya@google.com>
Change-Id: Ia3c882439bfbe6da28be2df0ec0c976d5c142677
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44424
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Bhanu Prakash Maiya 2020-08-12 13:04:27 -07:00 committed by Aaron Durbin
parent f852137c81
commit a8e24f648f
2 changed files with 7 additions and 0 deletions

View File

@ -144,3 +144,8 @@ bool variant_has_active_low_wifi_power(void)
return true;
}
int variant_get_daughterboard_id(void)
{
return extract_field(FW_CONFIG_MASK_DB_INDEX, FW_CONFIG_DB_INDEX_SHIFT);
}

View File

@ -72,5 +72,7 @@ bool variant_uses_v3_6_schematics(void);
bool variant_uses_codec_gpi(void);
/* Return true if variant has active low power enable fow WiFi. */
bool variant_has_active_low_wifi_power(void);
/* Return value of daughterboard ID */
int variant_get_daughterboard_id(void);
#endif /* __BASEBOARD_VARIANTS_H__ */