From b9277bad503d8f83f6990958579555e46c71f2ab Mon Sep 17 00:00:00 2001 From: Sridhar Siricilla Date: Sat, 27 Nov 2021 13:57:40 +0530 Subject: soc/intel/common: Rename compare_cse_version() function name The patch renames the compare_cse_version() function to the cse_compare_sub_part_version(). It makes the function generic so that it can be used to compare version of any CSE sub-partition like IOM, NPHY etc. TEST=Verified build for Brya Signed-off-by: Sridhar Siricilla Change-Id: I88a44a3c0ba2ad8a589602a35ea644dab535b287 Reviewed-on: https://review.coreboot.org/c/coreboot/+/59689 Reviewed-by: Krishna P Bhat D Reviewed-by: Tim Wawrzynczak Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/cse/cse_lite.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/soc/intel/common/block') diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c index bb644443e2..051172fc40 100644 --- a/src/soc/intel/common/block/cse/cse_lite.c +++ b/src/soc/intel/common/block/cse/cse_lite.c @@ -476,12 +476,13 @@ static const char *cse_get_source_rdev_fmap(void) } /* - * Compare versions of CSE CBFS RW and CSE RW partition + * Compare versions of CSE CBFS sub-component and CSE sub-component partition + * In case of CSE component comparison: * If ver_cmp_status = 0, no update is required * If ver_cmp_status < 0, coreboot downgrades CSE RW region * If ver_cmp_status > 0, coreboot upgrades CSE RW region */ -static int compare_cse_version(const struct fw_version *a, const struct fw_version *b) +static int cse_compare_sub_part_version(const struct fw_version *a, const struct fw_version *b) { if (a->major != b->major) return a->major - b->major; @@ -590,7 +591,7 @@ static enum cse_update_status cse_check_update_status(const struct cse_bp_info * cbfs_unmap(version_str); - ret = compare_cse_version(&cbfs_rw_version, cse_get_rw_version(cse_bp_info)); + ret = cse_compare_sub_part_version(&cbfs_rw_version, cse_get_rw_version(cse_bp_info)); if (ret == 0) return CSE_UPDATE_NOT_REQUIRED; else if (ret < 0) -- cgit v1.2.3