soc/intel/common: refactor locate_vbt and vbt_get

Instead of having all callers provide a region_device just for the
purpose of reading vbt.bin, let locate_vbt handle its entire life cycle,
simplifying the VBT access API.

Change-Id: Ib85e55164e217050b67674d020d17b2edf5ad14d
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/21897
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Patrick Georgi
2017-10-05 18:10:09 +02:00
parent cba7316c26
commit 9d3de2649f
6 changed files with 28 additions and 30 deletions

View File

@@ -96,10 +96,7 @@ enum cb_err fsp_fill_lb_framebuffer(struct lb_framebuffer *framebuffer)
uintptr_t fsp_load_vbt(void)
{
struct region_device rdev;
void *vbt_data = NULL;
vbt_data = locate_vbt(&rdev);
void *vbt_data = locate_vbt();
if (vbt_data == NULL)
printk(BIOS_NOTICE, "Could not locate a VBT file in CBFS\n");