diff options
author | Rudolf Marek <r.marek@assembler.cz> | 2009-04-13 18:00:09 +0000 |
---|---|---|
committer | Rudolf Marek <r.marek@assembler.cz> | 2009-04-13 18:00:09 +0000 |
commit | 497c8effceb9510ca89561a8fcc87cbc0acb8b08 (patch) | |
tree | aaaeaeda460a8f7c351488a424678bcefc211d9f /src/southbridge/via/vt8237r/vt8237r_early_smbus.c | |
parent | a572f83e7198eff99728335e697e9a0ef1e53a0c (diff) |
Following patch adds support for resume on VT8237 based motherboards. The NB
part of this patch adds support for resume well NVRAM. In which DQS values are
stored.
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4100 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/southbridge/via/vt8237r/vt8237r_early_smbus.c')
-rw-r--r-- | src/southbridge/via/vt8237r/vt8237r_early_smbus.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/southbridge/via/vt8237r/vt8237r_early_smbus.c b/src/southbridge/via/vt8237r/vt8237r_early_smbus.c index 49f3d90020..17b32d529f 100644 --- a/src/southbridge/via/vt8237r/vt8237r_early_smbus.c +++ b/src/southbridge/via/vt8237r/vt8237r_early_smbus.c @@ -294,6 +294,37 @@ void enable_rom_decode(void) pci_write_config8(dev, 0x41, 0x7f); } +#define ACPI_IS_WAKEUP_EARLY 1 + +int acpi_is_wakeup_early(void) { + device_t dev; + u16 tmp; + + print_debug("IN TEST WAKEUP\n"); + + /* Power management controller */ + dev = pci_locate_device(PCI_ID(PCI_VENDOR_ID_VIA, + PCI_DEVICE_ID_VIA_VT8237R_LPC), 0); + if (dev == PCI_DEV_INVALID) { + /* Power management controller */ + dev = pci_locate_device(PCI_ID(PCI_VENDOR_ID_VIA, + PCI_DEVICE_ID_VIA_VT8237S_LPC), 0); + if (dev == PCI_DEV_INVALID) + die("Power management controller not found\r\n"); + } + + /* Set ACPI base address to I/O VT8237R_ACPI_IO_BASE. */ + pci_write_config16(dev, 0x88, VT8237R_ACPI_IO_BASE | 0x1); + + /* Enable ACPI accessm RTC signal gated with PSON. */ + pci_write_config8(dev, 0x81, 0x84); + + tmp = inw(VT8237R_ACPI_IO_BASE + 0x04); + + print_debug_hex8(tmp); + return ((tmp & (7 << 10)) >> 10) == 1 ? 3 : 0 ; +} + #if defined(__GNUC__) void vt8237_early_spi_init(void) { |