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/cannonlake/chip.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/soc/intel/cannonlake/chip.c') 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 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; -- cgit v1.2.3