summaryrefslogtreecommitdiff
path: root/src/northbridge/intel
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2017-06-20 18:28:56 +0200
committerPatrick Rudolph <siro@das-labor.org>2017-07-12 16:12:21 +0000
commit64a702f41bcfa5a71ca0a0ab6d252863de3d38c7 (patch)
treee1726190c667d86d348568e4e6f0ba2857ecc4e2 /src/northbridge/intel
parentbac23033d3d2c3094d905a6adf9f6233f6278c14 (diff)
nb/intel/nehalem/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: Ifc921d7aa2d5b771fc4eaf3ec776c3a13f5496eb Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/20287 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')
-rw-r--r--src/northbridge/intel/nehalem/gma.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/northbridge/intel/nehalem/gma.c b/src/northbridge/intel/nehalem/gma.c
index 7489fd4ed2..0607f34fb1 100644
--- a/src/northbridge/intel/nehalem/gma.c
+++ b/src/northbridge/intel/nehalem/gma.c
@@ -1010,6 +1010,25 @@ static void intel_gma_init(const struct northbridge_intel_nehalem_config *info,
#endif
+/* Enable SCI to ACPI _GPE._L06 */
+static void gma_enable_swsci(void)
+{
+ u16 reg16;
+
+ /* clear DMISCI status */
+ reg16 = inw(DEFAULT_PMBASE + TCO1_STS);
+ reg16 &= DMISCI_STS;
+ outw(DEFAULT_PMBASE + TCO1_STS, reg16);
+
+ /* clear acpi tco status */
+ outl(DEFAULT_PMBASE + GPE0_STS, TCOSCI_STS);
+
+ /* enable acpi tco scis */
+ reg16 = inw(DEFAULT_PMBASE + GPE0_EN);
+ reg16 |= TCOSCI_EN;
+ outw(DEFAULT_PMBASE + GPE0_EN, reg16);
+}
+
static void gma_func0_init(struct device *dev)
{
u32 reg32;
@@ -1059,6 +1078,9 @@ static void gma_func0_init(struct device *dev)
/* Post VBIOS 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)
@@ -1113,25 +1135,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(DEFAULT_PMBASE + TCO1_STS);
- reg16 &= DMISCI_STS;
- outw(DEFAULT_PMBASE + TCO1_STS, reg16);
-
- /* clear acpi tco status */
- outl(DEFAULT_PMBASE + GPE0_STS, TCOSCI_STS);
-
- /* enable acpi tco scis */
- reg16 = inw(DEFAULT_PMBASE + GPE0_EN);
- reg16 |= TCOSCI_EN;
- outw(DEFAULT_PMBASE + GPE0_EN, reg16);
-}
-
static unsigned long
gma_write_acpi_tables(struct device *const dev,
unsigned long current,
@@ -1154,8 +1157,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;
}