summaryrefslogtreecommitdiff
path: root/src/northbridge/intel/sandybridge
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2016-03-09 04:02:42 +0100
committerMartin Roth <martinroth@google.com>2016-03-11 18:55:11 +0100
commitf0ab23cb031b4430fa5690ced901bfd741db5832 (patch)
tree7936dc8aa90b7968810f80abab2ee59ea8c9627e /src/northbridge/intel/sandybridge
parent10d6fceaa05112cd8780a46fd1b1db565c4dd21c (diff)
nortbridge/sandybridge/mrccache: parse the return code of flash->write
Change-Id: I2738da99e4651598faeaa228fba447d0872e9ded Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-on: https://review.coreboot.org/13999 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/northbridge/intel/sandybridge')
-rw-r--r--src/northbridge/intel/sandybridge/mrccache.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/northbridge/intel/sandybridge/mrccache.c b/src/northbridge/intel/sandybridge/mrccache.c
index a5dd456c9f..37bca8564b 100644
--- a/src/northbridge/intel/sandybridge/mrccache.c
+++ b/src/northbridge/intel/sandybridge/mrccache.c
@@ -160,6 +160,7 @@ static void update_mrc_cache(void *unused)
struct mrc_data_container *current = cbmem_find(CBMEM_ID_MRCDATA);
struct mrc_data_container *cache, *cache_base;
u32 cache_size;
+ int ret;
if (!current) {
printk(BIOS_ERR, "No MRC cache in cbmem. Can't update flash.\n");
@@ -220,8 +221,14 @@ static void update_mrc_cache(void *unused)
// 4. write mrc data with flash->write()
printk(BIOS_DEBUG, "Finally: write MRC cache update to flash at %p\n",
cache);
- flash->write(flash, to_flash_offset(flash, cache),
+ ret = flash->write(flash, to_flash_offset(flash, cache),
current->mrc_data_size + sizeof(*current), current);
+
+ if (ret)
+ printk(BIOS_WARNING, "Writing the MRC cache failed with ret %d\n",
+ ret);
+ else
+ printk(BIOS_DEBUG, "Successfully wrote MRC cache\n");
}
BOOT_STATE_INIT_ENTRY(BS_WRITE_TABLES, BS_ON_ENTRY, update_mrc_cache, NULL);