diff options
author | Subrata Banik <subratabanik@google.com> | 2024-06-28 09:46:07 +0000 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2024-07-03 06:13:31 +0000 |
commit | ac9396153c3fb55f25e0e46c0a4fb486accd02ad (patch) | |
tree | a7969cabef7a0705dae7f5415017a183f0248d9f /src/soc/intel | |
parent | 2cf0df37e7bf1e181cedcf785a07160462b1f66f (diff) |
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>
Diffstat (limited to 'src/soc/intel')
-rw-r--r-- | src/soc/intel/common/block/cse/cse.c | 38 | ||||
-rw-r--r-- | src/soc/intel/common/block/include/intelblocks/cse.h | 5 |
2 files changed, 18 insertions, 25 deletions
diff --git a/src/soc/intel/common/block/cse/cse.c b/src/soc/intel/common/block/cse/cse.c index b278b9f0d1..51241b20e7 100644 --- a/src/soc/intel/common/block/cse/cse.c +++ b/src/soc/intel/common/block/cse/cse.c @@ -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 " diff --git a/src/soc/intel/common/block/include/intelblocks/cse.h b/src/soc/intel/common/block/include/intelblocks/cse.h index 3db13248d2..552eb7b2d4 100644 --- a/src/soc/intel/common/block/include/intelblocks/cse.h +++ b/src/soc/intel/common/block/include/intelblocks/cse.h @@ -444,11 +444,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. */ |