diff options
author | Patrick Rudolph <siro@das-labor.org> | 2017-06-20 17:55:40 +0200 |
---|---|---|
committer | Patrick Rudolph <siro@das-labor.org> | 2017-07-12 16:12:25 +0000 |
commit | 76b93fe05f802206f7938416911fcc7e3b2aec91 (patch) | |
tree | fda9ea94a1fdefa4c45faaf649024f47a9c3d98b /src/northbridge/intel/sandybridge | |
parent | 89f3a60a37f679c383d57e509caa50f23c618d65 (diff) |
nb/intel/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: Ic7132cd1848a75043d10f32ac5d0e6b45d2e0fe4
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20284
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/sandybridge')
-rw-r--r-- | src/northbridge/intel/sandybridge/gma.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c index 9de3895cab..6d1044c77a 100644 --- a/src/northbridge/intel/sandybridge/gma.c +++ b/src/northbridge/intel/sandybridge/gma.c @@ -590,6 +590,25 @@ static void gma_pm_init_post_vbios(struct device *dev) } } +/* 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; @@ -632,6 +651,9 @@ static void gma_func0_init(struct device *dev) if (lightup_ok) gfx_set_init_done(1); } + + gma_enable_swsci(); + intel_gma_restore_opregion(); } static void gma_set_subsystem(device_t dev, unsigned vendor, unsigned device) @@ -666,25 +688,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, @@ -707,8 +710,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; } |