aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-12-06 21:42:09 -0700
committerBin Meng <bmeng.cn@gmail.com>2019-12-15 11:44:14 +0800
commitfa6cc1de1b613460f93d6471dc46b9d8a37e9459 (patch)
treeaf67283610d19d0bb09c85a3b14a291bba8a8091 /arch/x86/lib
parent0a0b09b47b2d3d492765a6436d7ad88a33c6744d (diff)
downloadu-boot-fa6cc1de1b613460f93d6471dc46b9d8a37e9459.zip
u-boot-fa6cc1de1b613460f93d6471dc46b9d8a37e9459.tar.gz
u-boot-fa6cc1de1b613460f93d6471dc46b9d8a37e9459.tar.bz2
x86: Don't export mrccache_update()
This function is only used within the implementation so make it static. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/mrccache.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c
index 10949d2..b9420a4 100644
--- a/arch/x86/lib/mrccache.c
+++ b/arch/x86/lib/mrccache.c
@@ -118,8 +118,20 @@ static struct mrc_data_container *find_next_mrc_cache(struct mrc_region *entry,
return cache;
}
-int mrccache_update(struct udevice *sf, struct mrc_region *entry,
- struct mrc_data_container *cur)
+/**
+ * mrccache_update() - update the MRC cache with a new record
+ *
+ * This writes a new record to the end of the MRC cache region. If the new
+ * record is the same as the latest record then the write is skipped
+ *
+ * @sf: SPI flash to write to
+ * @entry: Position and size of MRC cache in SPI flash
+ * @cur: Record to write
+ * @return 0 if updated, -EEXIST if the record is the same as the latest
+ * record, -EINVAL if the record is not valid, other error if SPI write failed
+ */
+static int mrccache_update(struct udevice *sf, struct mrc_region *entry,
+ struct mrc_data_container *cur)
{
struct mrc_data_container *cache;
ulong offset;