From 18859342c4100c294515c1e8c823bb468cfaba80 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Tue, 20 Jun 2017 18:27:11 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/20286 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier Reviewed-by: Aaron Durbin --- src/northbridge/intel/fsp_sandybridge/gma.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/northbridge') 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, -- cgit v1.2.3