summaryrefslogtreecommitdiff
path: root/src/soc/intel/cannonlake
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2017-10-05 18:10:09 +0200
committerPatrick Georgi <pgeorgi@google.com>2017-10-06 16:59:31 +0000
commit9d3de2649f46cc85269b4877f0d6e715a4fec5aa (patch)
tree3c5dc7955bc90ff0a2c6c097f1c6453f3ec35bd7 /src/soc/intel/cannonlake
parentcba7316c2662ee1c916345b034ca08dad43984f7 (diff)
downloadcoreboot-9d3de2649f46cc85269b4877f0d6e715a4fec5aa.tar.xz
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>
Diffstat (limited to 'src/soc/intel/cannonlake')
-rw-r--r--src/soc/intel/cannonlake/chip.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/soc/intel/cannonlake/chip.c b/src/soc/intel/cannonlake/chip.c
index e1cf167629..57a32244ca 100644
--- a/src/soc/intel/cannonlake/chip.c
+++ b/src/soc/intel/cannonlake/chip.c
@@ -26,7 +26,6 @@
#include <string.h>
static void *vbt;
-static struct region_device vbt_rdev;
#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
static const char *soc_acpi_name(const struct device *dev)
@@ -164,17 +163,10 @@ static void soc_enable(device_t dev)
dev->ops = &cpu_bus_ops;
}
-static void soc_final(void *data)
-{
- if (vbt)
- rdev_munmap(&vbt_rdev, vbt);
-}
-
struct chip_operations soc_intel_cannonlake_ops = {
CHIP_NAME("Intel Cannonlake")
.enable_dev = &soc_enable,
.init = &soc_init_pre_device,
- .final = &soc_final
};
/* UPD parameters to be initialized before SiliconInit */
@@ -189,7 +181,7 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
parse_devicetree(params);
/* Save VBT info and mapping */
- vbt = vbt_get(&vbt_rdev);
+ vbt = vbt_get();
/* Load VBT before devicetree-specific config. */
params->GraphicsConfigPtr = (uintptr_t)vbt;