summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block
diff options
context:
space:
mode:
authorSridhar Siricilla <sridhar.siricilla@intel.com>2023-01-10 14:43:18 +0530
committerSridhar Siricilla <sridhar.siricilla@intel.com>2023-01-13 04:50:59 +0000
commit4b6e8ca3a120ead2a6eaab150ddd93b11392a90d (patch)
treeb20c96940c29df62354c8751f7edd487ea0a73d3 /src/soc/intel/common/block
parenta088887acfdf5b4cadf788486481d6c10d435ba4 (diff)
soc/intel: Use 'enum cb_err' instead of bool
The patch uses 'enum cb_err' values as return values for cse_get_bp_info() function. TEST=Build the code for Gimble Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com> Change-Id: I900e40b699de344f497e61d974bca3fee7f6ecbf Reviewed-on: https://review.coreboot.org/c/coreboot/+/71821 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src/soc/intel/common/block')
-rw-r--r--src/soc/intel/common/block/cse/cse_lite.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c
index 6e9a09e7b6..074d8bdf4a 100644
--- a/src/soc/intel/common/block/cse/cse_lite.c
+++ b/src/soc/intel/common/block/cse/cse_lite.c
@@ -249,7 +249,7 @@ static bool cse_is_bp_cmd_info_possible(void)
return false;
}
-static bool cse_get_bp_info(struct get_bp_info_rsp *bp_info_rsp)
+static enum cb_err cse_get_bp_info(struct get_bp_info_rsp *bp_info_rsp)
{
struct get_bp_info_req {
struct mkhi_hdr hdr;
@@ -264,7 +264,7 @@ static bool cse_get_bp_info(struct get_bp_info_rsp *bp_info_rsp)
if (!cse_is_bp_cmd_info_possible()) {
printk(BIOS_ERR, "cse_lite: CSE does not meet prerequisites\n");
- return false;
+ return CB_ERR;
}
size_t resp_size = sizeof(struct get_bp_info_rsp);
@@ -272,18 +272,18 @@ static bool cse_get_bp_info(struct get_bp_info_rsp *bp_info_rsp)
if (heci_send_receive(&info_req, sizeof(info_req), bp_info_rsp, &resp_size,
HECI_MKHI_ADDR)) {
printk(BIOS_ERR, "cse_lite: Could not get partition info\n");
- return false;
+ return CB_ERR;
}
if (bp_info_rsp->hdr.result) {
printk(BIOS_ERR, "cse_lite: Get partition info resp failed: %d\n",
bp_info_rsp->hdr.result);
- return false;
+ return CB_ERR;
}
cse_print_boot_partition_info(&bp_info_rsp->bp_info);
- return true;
+ return CB_SUCCESS;
}
/*
* It sends HECI command to notify CSE about its next boot partition. When coreboot wants
@@ -1090,7 +1090,7 @@ void cse_fw_sync(void)
return;
}
- if (!cse_get_bp_info(&cse_bp_info)) {
+ if (cse_get_bp_info(&cse_bp_info) != CB_SUCCESS) {
printk(BIOS_ERR, "cse_lite: Failed to get CSE boot partition info\n");
/* If system is in recovery mode, don't trigger recovery again */