Jonathan A. Kollasch (jakllsch@kollasch.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/127
-gerrit
commit df8d54c4372f1e851c413c5903db20284eb57c06 Author: Jonathan A. Kollasch jakllsch@kollasch.net Date: Mon Aug 1 15:17:08 2011 -0500
Initialize ACPI to prevent spurious events at OS boot
Change-Id: I7e1138360f18ba857cf533baa8ec1db555aebcde Signed-off-by: Jonathan A. Kollasch jakllsch@kollasch.net --- src/southbridge/nvidia/ck804/lpc.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/src/southbridge/nvidia/ck804/lpc.c b/src/southbridge/nvidia/ck804/lpc.c index d371882..b66a569 100644 --- a/src/southbridge/nvidia/ck804/lpc.c +++ b/src/southbridge/nvidia/ck804/lpc.c @@ -28,6 +28,7 @@ #include <device/pci_ops.h> #include <pc80/mc146818rtc.h> #include <pc80/isa-dma.h> +#include <delay.h> #include <bitops.h> #include <arch/io.h> #include <arch/ioapic.h> @@ -104,6 +105,23 @@ static void rom_dummy_write(device_t dev) pci_write_config8(dev, 0x6d, new); }
+static void lpc_acpi_init(u16 base) +{ + u16 word; + + printk(BIOS_SPEW, "%s: base = %x \n", __func__, base); + + /* clear sleep, set SCI_EN */ + word = inw(base + 4); + word &= ~(7 << 10); + word |= 1; + outw(word, base + 4); + udelay(100); /* seems to be needed */ + + /* clear ACPI PM1 event status */ + outw(0xffff, base + 0); +} + unsigned pm_base = 0;
static void lpc_init(device_t dev) @@ -169,6 +187,8 @@ static void lpc_init(device_t dev) /* Initialize ISA DMA. */ isa_dma_init();
+ lpc_acpi_init(pm_base); + rom_dummy_write(dev); }