diff options
author | Patrick Rudolph <siro@das-labor.org> | 2017-06-20 18:27:11 +0200 |
---|---|---|
committer | Patrick Rudolph <siro@das-labor.org> | 2017-07-12 16:12:22 +0000 |
commit | 18859342c4100c294515c1e8c823bb468cfaba80 (patch) | |
tree | 84ff198fd793d2fa61282180f88a62802f6657d0 /src/northbridge/intel/fsp_sandybridge/gma.c | |
parent | 64a702f41bcfa5a71ca0a0ab6d252863de3d38c7 (diff) |
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>
Diffstat (limited to 'src/northbridge/intel/fsp_sandybridge/gma.c')
-rw-r--r-- | src/northbridge/intel/fsp_sandybridge/gma.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/northbridge/intel/fsp_sandybridge/gma.c b/src/northbridge/intel/fsp_sandybridge/gma.c index 224b674094..a3dbb1cc76 100644 --- a/src/northbridge/intel/fsp_sandybridge/gma.c +++ b/src/northbridge/intel/fsp_sandybridge/gma.c @@ -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, |