From 9d3de2649f46cc85269b4877f0d6e715a4fec5aa Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 5 Oct 2017 18:10:09 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/21897 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/soc/intel/apollolake/chip.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/soc/intel/apollolake/chip.c') diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index 5759fb6f4c..f122876ab6 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -49,7 +49,6 @@ #include "chip.h" static void *vbt; -static struct region_device vbt_rdev; static const char *soc_acpi_name(const struct device *dev) { @@ -317,7 +316,7 @@ static void soc_init(void *data) struct global_nvs_t *gnvs; /* Save VBT info and mapping */ - vbt = vbt_get(&vbt_rdev); + vbt = vbt_get(); /* Snapshot the current GPIO IRQ polarities. FSP is setting a * default policy that doesn't honor boards' requirements. */ @@ -354,9 +353,6 @@ static void soc_init(void *data) static void soc_final(void *data) { - if (vbt) - rdev_munmap(&vbt_rdev, vbt); - /* Disable global reset, just in case */ pmc_global_reset_enable(0); /* Make sure payload/OS can't trigger global reset */ -- cgit v1.2.3