aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/intel/haswell/gma.c
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2017-05-20 11:49:22 +0200
committerNico Huber <nico.h@gmx.de>2017-06-15 12:14:38 +0200
commit9aca643ccb69db959906c5c233df9cd1807f5cf0 (patch)
tree7ceb943e5cff3f7e87a04ddb9bdc12f4a547d572 /src/northbridge/intel/haswell/gma.c
parentee14ccca7a94ba2b14ed032baa6d1ab5dc8b92e9 (diff)
nb/intel/haswell/gma: Use common init_igd_opregion method
Use common init_igd_opregion method and remove duplicated code in acpi.c. Change-Id: I811e8bd2be68813321dc4581af02e1c21b0da076 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/19910 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/northbridge/intel/haswell/gma.c')
-rw-r--r--src/northbridge/intel/haswell/gma.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
index 172aa7ed0d..fa4dec91e2 100644
--- a/src/northbridge/intel/haswell/gma.c
+++ b/src/northbridge/intel/haswell/gma.c
@@ -23,6 +23,7 @@
#include <drivers/intel/gma/i915_reg.h>
#include <drivers/intel/gma/i915.h>
#include <cpu/intel/haswell/haswell.h>
+#include <northbridge/intel/common/gma_opregion.h>
#include <stdlib.h>
#include <string.h>
@@ -493,6 +494,20 @@ 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,
@@ -500,11 +515,13 @@ gma_write_acpi_tables(struct device *const dev,
{
igd_opregion_t *opregion = (igd_opregion_t *)current;
- if (init_igd_opregion(opregion))
+ if (init_igd_opregion(opregion) != CB_SUCCESS)
return current;
current += sizeof(igd_opregion_t);
+ gma_enable_swsci();
+
current = acpi_align_current(current);
return current;
}