summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2021-02-05 17:27:45 -0800
committerPatrick Georgi <pgeorgi@google.com>2021-03-17 08:10:35 +0000
commita9b44f4c79078210fe9966daf2412cc222c2d0a9 (patch)
tree6d9ac8e9f83f247be8f43a6f7bae00786657d18c /src/include
parent806deb666110d231a4800a5a1adcc932242aefa5 (diff)
spd_bin: Replace get_spd_cbfs_rdev() with spd_cbfs_map()
In pursuit of the goal of eliminating the proliferation of raw region devices to represent CBFS files outside of the CBFS core code, this patch removes the get_spd_cbfs_rdev() API and instead replaces it with spd_cbfs_map() which will find and map the SPD file in one go and return a pointer to the relevant section. (This makes it impossible to unmap the mapping again, which all but one of the users didn't bother to do anyway since the API is only used on platforms with memory-mapped flash. Presumably this will stay that way in the future so this is not something worth worrying about.) Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: Iec7571bec809f2f0712e7a97b4c853b8b40702d1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/50350 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/spd_bin.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/include/spd_bin.h b/src/include/spd_bin.h
index 11a0084c70..973eb498a7 100644
--- a/src/include/spd_bin.h
+++ b/src/include/spd_bin.h
@@ -43,8 +43,7 @@ struct spd_block {
};
void print_spd_info(uint8_t spd[]);
-/* Return 0 on success & -1 on failure */
-int get_spd_cbfs_rdev(struct region_device *spd_rdev, u8 spd_index);
+uintptr_t spd_cbfs_map(u8 spd_index);
void dump_spd_info(struct spd_block *blk);
void get_spd_smbus(struct spd_block *blk);