summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/intel/fsp2_0/memory_init.c6
-rw-r--r--src/drivers/intel/fsp2_0/silicon_init.c9
2 files changed, 5 insertions, 10 deletions
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index 46dd2ef8d5..559d83e9df 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -293,9 +293,8 @@ static void do_fsp_memory_init(struct fsp_header *hdr, bool s3wake,
upd = (FSPM_UPD *)(hdr->cfg_region_offset + hdr->image_base);
- if (upd->FspUpdHeader.Signature != FSPM_UPD_SIGNATURE) {
+ if (upd->FspUpdHeader.Signature != FSPM_UPD_SIGNATURE)
die("Invalid FSPM signature!\n");
- }
/* Copy the default values from the UPD area */
memcpy(&fspm_upd, upd, sizeof(fspm_upd));
@@ -417,9 +416,8 @@ void fsp_memory_init(bool s3wake)
else
status = load_fspm_xip(&hdr, &file_data);
- if (status != CB_SUCCESS) {
+ if (status != CB_SUCCESS)
die("Loading FSPM failed!\n");
- }
/* Signal that FSP component has been loaded. */
prog_segment_loaded(hdr.image_base, hdr.image_size, SEG_FINAL);
diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c
index a57f97603e..9f0bf7c892 100644
--- a/src/drivers/intel/fsp2_0/silicon_init.c
+++ b/src/drivers/intel/fsp2_0/silicon_init.c
@@ -32,9 +32,8 @@ static void do_silicon_init(struct fsp_header *hdr)
supd = (FSPS_UPD *) (hdr->cfg_region_offset + hdr->image_base);
- if (supd->FspUpdHeader.Signature != FSPS_UPD_SIGNATURE) {
+ if (supd->FspUpdHeader.Signature != FSPS_UPD_SIGNATURE)
die("Invalid FSPS signature\n");
- }
memcpy(&upd, supd, sizeof(upd));
@@ -96,16 +95,14 @@ void fsps_load(bool s3wake)
size = region_device_sz(&rdev);
dest = cbmem_add(CBMEM_ID_REFCODE, size);
- if (dest == NULL) {
+ if (dest == NULL)
die("Could not add FSPS to CBMEM!\n");
- }
if (rdev_readat(&rdev, dest, 0, size) < 0)
die("Failed to read FSPS!\n");
- if (fsp_component_relocate((uintptr_t)dest, dest, size) < 0) {
+ if (fsp_component_relocate((uintptr_t)dest, dest, size) < 0)
die("Unable to relocate FSPS!\n");
- }
/* Create new region device in memory after relocation. */
rdev_chain(&rdev, &addrspace_32bit.rdev, (uintptr_t)dest, size);