aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/opregion.c
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/common/opregion.c
parentcba7316c2662ee1c916345b034ca08dad43984f7 (diff)
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/common/opregion.c')
-rw-r--r--src/soc/intel/common/opregion.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/soc/intel/common/opregion.c b/src/soc/intel/common/opregion.c
index 1eb8609ada..b8111a0760 100644
--- a/src/soc/intel/common/opregion.c
+++ b/src/soc/intel/common/opregion.c
@@ -23,11 +23,10 @@
enum cb_err init_igd_opregion(igd_opregion_t *opregion)
{
- struct region_device vbt_rdev;
optionrom_vbt_t *vbt;
optionrom_vbt_t *ext_vbt;
- vbt = locate_vbt(&vbt_rdev);
+ vbt = locate_vbt();
if (!vbt) {
printk(BIOS_ERR, "VBT couldn't be read\n");
@@ -64,7 +63,5 @@ enum cb_err init_igd_opregion(igd_opregion_t *opregion)
/* FIXME We just assume we're mobile for now */
opregion->header.mailboxes = MAILBOXES_MOBILE;
- rdev_munmap(&vbt_rdev, vbt);
-
return CB_SUCCESS;
}