mb/google/zork: Remove validity checks for FW_CONFIG in CBI
After confirming that all zork variants and phases have valid FW_CONFIG value in CBI, this patch is dropping FW_CONFIG validity checks like VARIANT_HAS_FW_CONFIG and VARIANT_BOARD_VER_FW_CONFIG_VALID in Kconfig and will also remove associated helper functions. BRANCH=none BUG=b:162344105,b:152817444 TEST=Check if FW_CONFIG bits can be read in coreboot and FW_CONIFG helper function do not return 0 if board has a valid FW_CONFIG in CBI. Signed-off-by: Bhanu Prakash Maiya <bhanumaiya@google.com> Change-Id: I633dc7c500ef8759f3fffb0db6b76d96257c3c9a Reviewed-on: https://review.coreboot.org/c/coreboot/+/44422 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
committed by
Aaron Durbin
parent
7b54c15a67
commit
f852137c81
@@ -143,18 +143,6 @@ config PICASSO_FW_B_POSITION
|
||||
Location of the AMD firmware in the RW_B region. This is the
|
||||
start of the RW-A region + 64 bytes for the cbfs header.
|
||||
|
||||
config VARIANT_HAS_FW_CONFIG
|
||||
bool
|
||||
help
|
||||
Honor FW_CONFIG in CBI.
|
||||
|
||||
config VARIANT_BOARD_VER_FW_CONFIG_VALID
|
||||
int
|
||||
default 256
|
||||
depends on VARIANT_HAS_FW_CONFIG
|
||||
help
|
||||
Which board version did FW_CONFIG become valid in CBI.
|
||||
|
||||
config VARIANT_SUPPORTS_PRE_V3_SCHEMATICS
|
||||
bool
|
||||
default y if BOARD_GOOGLE_TREMBYLE
|
||||
|
@@ -48,36 +48,10 @@ enum {
|
||||
FW_CONFIG_SHIFT_FAN = 27,
|
||||
};
|
||||
|
||||
int variant_fw_config_valid(void)
|
||||
{
|
||||
static uint32_t board_version;
|
||||
const uint32_t bv_valid = CONFIG_VARIANT_BOARD_VER_FW_CONFIG_VALID;
|
||||
|
||||
if (!CONFIG(VARIANT_HAS_FW_CONFIG))
|
||||
return 0;
|
||||
|
||||
/* Fast path for non-zero board version. */
|
||||
if (board_version >= bv_valid)
|
||||
return 1;
|
||||
|
||||
if (google_chromeec_cbi_get_board_version(&board_version)) {
|
||||
printk(BIOS_ERR, "Unable to obtain board version for FW_CONFIG\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (board_version >= bv_valid)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_fw_config(uint32_t *val)
|
||||
{
|
||||
static uint32_t known_value;
|
||||
|
||||
if (!variant_fw_config_valid())
|
||||
return -1;
|
||||
|
||||
if (known_value) {
|
||||
*val = known_value;
|
||||
return 0;
|
||||
|
@@ -56,8 +56,6 @@ const fsp_dxio_descriptor *baseboard_get_dxio_descriptors(size_t *num);
|
||||
const fsp_ddi_descriptor *baseboard_get_ddi_descriptors(size_t *num);
|
||||
|
||||
/* Retrieve attributes from FW_CONFIG in CBI. */
|
||||
/* Return 1 if FW_CONFIG expected to be valid, else 0. */
|
||||
int variant_fw_config_valid(void);
|
||||
/* Return 0 if non-existent, 1 if present. */
|
||||
int variant_has_emmc(void);
|
||||
/* Return 0 if non-existent, 1 if present. */
|
||||
|
Reference in New Issue
Block a user