summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2017-06-20 18:25:22 +0200
committerPatrick Rudolph <siro@das-labor.org>2017-07-12 16:12:24 +0000
commit89f3a60a37f679c383d57e509caa50f23c618d65 (patch)
tree77fc323b739901bee2247776f00b81513d48e2b1
parent18859342c4100c294515c1e8c823bb468cfaba80 (diff)
downloadcoreboot-89f3a60a37f679c383d57e509caa50f23c618d65.tar.xz
nb/intel/haswell/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: I1944fcca91ee1a0ad8df5c8b6f402e907de5e78f Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/20285 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--src/northbridge/intel/haswell/gma.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
index 6cd1f6f1d7..4baea7071d 100644
--- a/src/northbridge/intel/haswell/gma.c
+++ b/src/northbridge/intel/haswell/gma.c
@@ -437,6 +437,20 @@ static void gma_pm_init_post_vbios(struct device *dev)
gtt_write(0x0a188, 0x00000001);
}
+/* Enable SCI to ACPI _GPE._L06 */
+static void gma_enable_swsci(void)
+{
+ u16 reg16;
+
+ /* clear DMISCI status */
+ reg16 = inw(get_pmbase() + TCO1_STS);
+ reg16 &= DMISCI_STS;
+ outw(get_pmbase() + TCO1_STS, reg16);
+
+ /* clear and enable ACPI TCO SCI */
+ enable_tco_sci();
+}
+
static void gma_func0_init(struct device *dev)
{
int lightup_ok = 0;
@@ -475,6 +489,9 @@ static void gma_func0_init(struct device *dev)
/* Post panel init */
gma_pm_init_post_vbios(dev);
+
+ gma_enable_swsci();
+ intel_gma_restore_opregion();
}
static void gma_set_subsystem(device_t dev, unsigned vendor, unsigned device)
@@ -509,20 +526,6 @@ static void gma_ssdt(device_t device)
drivers_intel_gma_displays_ssdt_generate(gfx);
}
-/* Enable SCI to ACPI _GPE._L06 */
-static void gma_enable_swsci(void)
-{
- u16 reg16;
-
- /* clear DMISCI status */
- reg16 = inw(get_pmbase() + TCO1_STS);
- reg16 &= DMISCI_STS;
- outw(get_pmbase() + TCO1_STS, reg16);
-
- /* clear and enable ACPI TCO SCI */
- enable_tco_sci();
-}
-
static unsigned long
gma_write_acpi_tables(struct device *const dev,
unsigned long current,
@@ -545,8 +548,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;
}