diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2009-01-20 22:53:10 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2009-01-20 22:53:10 +0000 |
commit | 54309d637ac2cf474793b884b5392f0a6e5390a9 (patch) | |
tree | 7d7acb4cb7b4e394ba29eef08c553bd34aeb1193 /src/southbridge/intel/i82801gx/i82801gx_smihandler.c | |
parent | 977ed2d99565fc35c52f50cbe310b7b211611e94 (diff) | |
download | coreboot-staging-54309d637ac2cf474793b884b5392f0a6e5390a9.zip coreboot-staging-54309d637ac2cf474793b884b5392f0a6e5390a9.tar.gz |
Update Kontron board
- use new features of the ich7 update
- move rambase above 1M to avoid memory trashing through SMM relocation
- enable superio HWM
Update ICH7 driver
- minor smi cosmetics (in progress)
- add real ac97 driver
- add real azalia driver
- fix some interrupt issues
- fix some sata issues
- include Patrick's fix for _lpc.c
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3886 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/southbridge/intel/i82801gx/i82801gx_smihandler.c')
-rw-r--r-- | src/southbridge/intel/i82801gx/i82801gx_smihandler.c | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/southbridge/intel/i82801gx/i82801gx_smihandler.c b/src/southbridge/intel/i82801gx/i82801gx_smihandler.c index e15dcad..11096fe 100644 --- a/src/southbridge/intel/i82801gx/i82801gx_smihandler.c +++ b/src/southbridge/intel/i82801gx/i82801gx_smihandler.c @@ -1,7 +1,7 @@ /* * This file is part of the coreboot project. * - * Copyright (C) 2008 coresystems GmbH + * Copyright (C) 2008-2009 coresystems GmbH * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -248,16 +248,26 @@ void southbridge_io_trap_handler(int smif) printk_debug("SMI function trap 0x%x: ", smif); - switch (smif) { case 0x32: printk_debug("OS Init\n"); + //gnvs->smif = 0; + break; + case 0xd5: + printk_debug("Set Brightness\n"); + reg8 = gnvs->brtl; + printk_debug("brtl: %x\n", reg8); + outb(0x17, 0x66); + outb(reg8, 0x62); + //gnvs->smif = 0; break; case 0xd6: printk_debug("Get Brightness\n"); outb(0x17, 0x66); reg8 = inb(0x62); + printk_debug("brtl: %x\n", reg8); gnvs->brtl = reg8; + //gnvs->smif = 0; break; default: printk_debug("Unknown function\n"); @@ -401,12 +411,24 @@ void southbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_sav if (smi_sts & (1 << 4)) { // SLP_SMI u32 reg32; + + /* First, disable further SMIs */ + reg8 = inb(pmbase + SMI_EN); + reg8 &= ~SLP_SMI_EN; + outb(reg8, pmbase + SMI_EN); + + /* Next, do the deed, we should change + * power on after power loss bits here + * if we're going to S5 + */ + + /* Write back to the SLP register to cause the + * originally intended event again. + */ reg32 = inl(pmbase + 0x04); printk_debug("SMI#: SLP = 0x%08x\n"); printk_debug("SMI#: Powering off.\n"); - outl((6 << 10), pmbase + 0x04); - outl((1 << 13) | (6 << 10), pmbase + 0x04); - printk_debug("....\n"); + outl(reg32, pmbase + 0x04); } } |