soc/intel/cmn/cse: Make ME firmware version query function static
This change modifies the get_me_fw_version() function to be statically scoped within src/soc/intel/common/block/cse/cse.c, as it is only used by the print_me_fw_version() function in the same file. The function declaration is also removed from intelblocks/cse.h. The order of the function definitions in cse.c was also changed to be more logical, with the now static helper function get_me_fw_version() defined first, before it is used. TEST=Able to build google/rex. Change-Id: Idd3a6431cfa824227361c7ed4f0d5300f1d04846 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83257 Reviewed-by: Dinesh Gehlot <digehlot@google.com> Reviewed-by: Nick Vaccaro <nvaccaro@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
2cf0df37e7
commit
ac9396153c
@ -861,26 +861,8 @@ int cse_hmrfpo_get_status(void)
|
||||
return resp.status;
|
||||
}
|
||||
|
||||
void print_me_fw_version(void *unused)
|
||||
{
|
||||
if (CONFIG(SOC_INTEL_CSE_LITE_SYNC_BY_PAYLOAD))
|
||||
return;
|
||||
|
||||
struct me_fw_ver_resp resp = {0};
|
||||
|
||||
/* Ignore if UART debugging is disabled */
|
||||
if (!CONFIG(CONSOLE_SERIAL))
|
||||
return;
|
||||
|
||||
if (get_me_fw_version(&resp) == CB_SUCCESS) {
|
||||
printk(BIOS_DEBUG, "ME: Version: %d.%d.%d.%d\n", resp.code.major,
|
||||
resp.code.minor, resp.code.hotfix, resp.code.build);
|
||||
return;
|
||||
}
|
||||
printk(BIOS_DEBUG, "ME: Version: Unavailable\n");
|
||||
}
|
||||
|
||||
enum cb_err get_me_fw_version(struct me_fw_ver_resp *resp)
|
||||
/* Queries and gets ME firmware version */
|
||||
static enum cb_err get_me_fw_version(struct me_fw_ver_resp *resp)
|
||||
{
|
||||
const struct mkhi_hdr fw_ver_msg = {
|
||||
.group_id = MKHI_GROUP_ID_GEN,
|
||||
@ -927,6 +909,22 @@ enum cb_err get_me_fw_version(struct me_fw_ver_resp *resp)
|
||||
return CB_SUCCESS;
|
||||
}
|
||||
|
||||
void print_me_fw_version(void *unused)
|
||||
{
|
||||
struct me_fw_ver_resp resp = {0};
|
||||
|
||||
/* Ignore if UART debugging is disabled */
|
||||
if (!CONFIG(CONSOLE_SERIAL))
|
||||
return;
|
||||
|
||||
if (get_me_fw_version(&resp) == CB_SUCCESS) {
|
||||
printk(BIOS_DEBUG, "ME: Version: %d.%d.%d.%d\n", resp.code.major,
|
||||
resp.code.minor, resp.code.hotfix, resp.code.build);
|
||||
return;
|
||||
}
|
||||
printk(BIOS_DEBUG, "ME: Version: Unavailable\n");
|
||||
}
|
||||
|
||||
void cse_trigger_vboot_recovery(enum csme_failure_reason reason)
|
||||
{
|
||||
printk(BIOS_DEBUG, "cse: CSE status registers: HFSTS1: 0x%x, HFSTS2: 0x%x "
|
||||
|
@ -443,11 +443,6 @@ int cse_hmrfpo_get_status(void);
|
||||
*/
|
||||
void print_me_fw_version(void *unused);
|
||||
|
||||
/*
|
||||
* Queries and gets ME firmware version
|
||||
*/
|
||||
enum cb_err get_me_fw_version(struct me_fw_ver_resp *resp);
|
||||
|
||||
/*
|
||||
* Checks current working operation state is normal or not.
|
||||
* Returns true if CSE's current working state is normal, otherwise false.
|
||||
|
Loading…
x
Reference in New Issue
Block a user