Patchwork Patch set updated: 965d13d i82801gx: enable ACPI during S3 resume

login
register
about
Submitter gerrit@coreboot.org
Date 2011-06-07 14:56:51
Message ID <E1QTxi7-0008GX-KC@ra.coresystems.de>
Download mbox | patch
Permalink /patch/3072/
State New, archived
Headers show

Comments

gerrit@coreboot.org - 2011-06-07 14:56:51
Sven Schnelle (svens@stackframe.org) just uploaded a new patch set to gerrit, which you can find at
http://review.coreboot.org/7

-gerrit

Patch

commit 965d13d8627ac29782af2cc3db3e4fffeaa7fc76
Author: Sven Schnelle <svens@stackframe.org>
Date:   Sun Jun 5 11:39:12 2011 +0200

    i82801gx: enable ACPI during S3 resume
    
    disabling ACPI during S3 wakeup breaks ACPI wakeup, as the
    Host OS is assuming that ACPI is enabled.
    
    Change-Id: I8ced72c4b553d41a57f26d64998118e8a77621f8
    Signed-off-by: Sven Schnelle <svens@stackframe.org>

diff --git a/src/southbridge/intel/i82801gx/lpc.c b/src/southbridge/intel/i82801gx/lpc.c
index 394f161..b4b2f41 100644
--- a/src/southbridge/intel/i82801gx/lpc.c
+++ b/src/southbridge/intel/i82801gx/lpc.c
@@ -341,6 +341,7 @@  static void i82801gx_lock_smm(struct device *dev)
 	u8 reg8;
 #endif
 
+	if (acpi_slp_type != 3) {
 #if ENABLE_ACPI_MODE_IN_COREBOOT
 		printk(BIOS_DEBUG, "Enabling ACPI via APMC:\n");
 		outb(APM_CNT_ACPI_ENABLE, APM_CNT); // Enable ACPI mode
@@ -350,6 +351,10 @@  static void i82801gx_lock_smm(struct device *dev)
 		outb(APM_CNT_ACPI_DISABLE, APM_CNT); // Disable ACPI mode
 		printk(BIOS_DEBUG, "done.\n");
 #endif
+	} else {
+		printk(BIOS_DEBUG, "S3 wakeup, enabling ACPI via APMC\n");
+		outb(APM_CNT_ACPI_ENABLE, APM_CNT);
+	}
 	/* Don't allow evil boot loaders, kernels, or
 	 * userspace applications to deceive us:
 	 */