nb/intel/fsp_sandybridge/gma: Set ASLS on S3 resume

Use new GMA driver method to set ASLS on S3 resume, too.
Move gma_enable_swsci to init method as it should always be run.

Change-Id: I772d680774890c32ca6dc9b1e2143b3ab3bf6513
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20286
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Patrick Rudolph 2017-06-20 18:27:11 +02:00
parent 64a702f41b
commit 18859342c4
1 changed files with 9 additions and 3 deletions

View File

@ -117,6 +117,14 @@ static void gma_enable_swsci(void)
outw(DEFAULT_PMBASE + GPE0_EN, reg16);
}
static void gma_init(struct device *dev)
{
pci_dev_init(dev);
gma_enable_swsci();
intel_gma_restore_opregion();
}
static unsigned long
gma_write_acpi_tables(struct device *const dev,
unsigned long current,
@ -139,8 +147,6 @@ gma_write_acpi_tables(struct device *const dev,
printk(BIOS_ERR, "Error: GNVS table not found.\n");
}
gma_enable_swsci();
current = acpi_align_current(current);
return current;
}
@ -154,7 +160,7 @@ static struct device_operations gma_func0_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.acpi_fill_ssdt_generator = gma_ssdt,
.init = pci_dev_init,
.init = gma_init,
.scan_bus = 0,
.enable = 0,
.ops_pci = &gma_pci_ops,