Tim Wawrzynczak submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Krishna P Bhat D: Looks good to me, but someone else must approve Tim Wawrzynczak: Looks good to me, approved
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 <sridhar.siricilla@intel.com>
Change-Id: I88a44a3c0ba2ad8a589602a35ea644dab535b287
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59689
Reviewed-by: Krishna P Bhat D <krishna.p.bhat.d@intel.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M src/soc/intel/common/block/cse/cse_lite.c
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c
index bb64444..051172f 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 @@
}

/*
- * 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 @@

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)

8 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.

To view, visit change 59689. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I88a44a3c0ba2ad8a589602a35ea644dab535b287
Gerrit-Change-Number: 59689
Gerrit-PatchSet: 10
Gerrit-Owner: Sridhar Siricilla <sridhar.siricilla@intel.com>
Gerrit-Reviewer: Krishna P Bhat D <krishna.p.bhat.d@intel.com>
Gerrit-Reviewer: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Anfernee Chen <anfernee_chen@wistron.corp-partner.google.com>
Gerrit-CC: Kane Chen <kane.chen@intel.com>
Gerrit-CC: Mark Hsieh <mark_hsieh@wistron.corp-partner.google.com>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-CC: Sridhar Siricilla <sridhar.siricilla@intel.corp-partner.google.com>
Gerrit-MessageType: merged