aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSridhar Siricilla <sridhar.siricilla@intel.com>2022-04-28 14:36:38 +0530
committerMartin L Roth <gaumless@tutanota.com>2022-05-28 14:20:30 +0000
commitb4de2612289a2a58863671318f5aac619c05f5d2 (patch)
tree022e3ce4d0b5534a68c8a4e06829ef740e56f484 /src
parentab5b7b3eadcf386a1c08d9dcd1e9b85b0cb7a7d1 (diff)
soc/intel/common: Use coreboot error codes
The patch uses coreboot error codes instead of uint8_t data type in the pre_mem_debug_init function. TEST=build code for Gimble Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com> Change-Id: I957ff764900cb789bf2aacf0472dcb281f48af07 Reviewed-on: https://review.coreboot.org/c/coreboot/+/64301 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/common/basecode/debug/debug_feature.c6
-rw-r--r--src/soc/intel/common/basecode/include/intelbasecode/debug_feature.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/soc/intel/common/basecode/debug/debug_feature.c b/src/soc/intel/common/basecode/debug/debug_feature.c
index 1c55f0b887..df32e1dbf2 100644
--- a/src/soc/intel/common/basecode/debug/debug_feature.c
+++ b/src/soc/intel/common/basecode/debug/debug_feature.c
@@ -27,12 +27,12 @@ bool is_debug_cse_fw_update_disable(void)
return pre_mem_debug.cse_fw_update_disable == 1;
}
-uint8_t pre_mem_debug_init(void)
+enum cb_err pre_mem_debug_init(void)
{
if (spi_flash_read(boot_device_spi_flash(), PRE_MEM_FEATURE_CTRL_OFFSET,
PRE_MEM_FEATURE_CTRL_SZ, &pre_mem_debug)) {
printk(BIOS_ERR, "Failed to read Descriptor Region from SPI Flash\n");
- return 1;
+ return CB_ERR;
}
- return 0;
+ return CB_SUCCESS;
}
diff --git a/src/soc/intel/common/basecode/include/intelbasecode/debug_feature.h b/src/soc/intel/common/basecode/include/intelbasecode/debug_feature.h
index 51e3f4d05a..664a739932 100644
--- a/src/soc/intel/common/basecode/include/intelbasecode/debug_feature.h
+++ b/src/soc/intel/common/basecode/include/intelbasecode/debug_feature.h
@@ -12,6 +12,6 @@ bool is_debug_cse_fw_update_disable(void);
* Reads OEM Section area in the Descriptor Region and
* populates pre_mem_debug structure.
*/
-uint8_t pre_mem_debug_init(void);
+enum cb_err pre_mem_debug_init(void);
#endif