soc/intel/common: Use enum csme_failure_reason

The patch updates return type for below functions as they uses
'enum csme_failure_reason' type return values.

 1. cse_sub_part_trigger_update()
 2. handle_cse_sub_part_fw_update_rv()
 3. cse_sub_part_fw_update()

TEST=Build coreboot code for Gimble

Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Change-Id: I43bc2d518a275894860e4d3c930c3c4d9685fb3a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71792
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Krishna P Bhat D <krishna.p.bhat.d@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Sridhar Siricilla 2023-01-10 17:12:01 +05:30
parent 3ca8477901
commit 0ae7a8b765
1 changed files with 5 additions and 5 deletions

View File

@ -952,8 +952,8 @@ static bool cse_prep_for_component_update(const struct cse_bp_info *cse_bp_info)
return cse_hmrfpo_enable(); return cse_hmrfpo_enable();
} }
static uint8_t cse_sub_part_trigger_update(enum bpdt_entry_type type, uint8_t bp, static enum csme_failure_reason cse_sub_part_trigger_update(enum bpdt_entry_type type,
const void *subpart_cbfs_rw, const size_t blob_sz, uint8_t bp, const void *subpart_cbfs_rw, const size_t blob_sz,
struct region_device *target_rdev) struct region_device *target_rdev)
{ {
if (region_device_sz(target_rdev) < blob_sz) { if (region_device_sz(target_rdev) < blob_sz) {
@ -977,7 +977,7 @@ static uint8_t cse_sub_part_trigger_update(enum bpdt_entry_type type, uint8_t bp
return CSE_LITE_SKU_PART_UPDATE_SUCCESS; return CSE_LITE_SKU_PART_UPDATE_SUCCESS;
} }
static uint8_t handle_cse_sub_part_fw_update_rv(uint8_t rv) static enum csme_failure_reason handle_cse_sub_part_fw_update_rv(enum csme_failure_reason rv)
{ {
switch (rv) { switch (rv) {
case CSE_LITE_SKU_PART_UPDATE_SUCCESS: case CSE_LITE_SKU_PART_UPDATE_SUCCESS:
@ -1052,14 +1052,14 @@ error_exit:
return rv; return rv;
} }
static uint8_t cse_sub_part_fw_update(const struct cse_bp_info *cse_bp_info) static enum csme_failure_reason cse_sub_part_fw_update(const struct cse_bp_info *cse_bp_info)
{ {
if (skip_cse_sub_part_update()) { if (skip_cse_sub_part_update()) {
printk(BIOS_INFO, "CSE Sub-partition update not required\n"); printk(BIOS_INFO, "CSE Sub-partition update not required\n");
return CSE_LITE_SKU_SUB_PART_UPDATE_NOT_REQ; return CSE_LITE_SKU_SUB_PART_UPDATE_NOT_REQ;
} }
int rv; enum csme_failure_reason rv;
rv = cse_sub_part_fw_component_update(IOM_FW, cse_bp_info, rv = cse_sub_part_fw_component_update(IOM_FW, cse_bp_info,
CONFIG_SOC_INTEL_CSE_IOM_CBFS_NAME); CONFIG_SOC_INTEL_CSE_IOM_CBFS_NAME);