diff options
author | Stefan Reinauer <stepan@openbios.org> | 2006-04-06 21:37:10 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2006-04-06 21:37:10 +0000 |
commit | 966d0e6d70b20b6d14e265d59aaad37ce84d2ddb (patch) | |
tree | 70a4ea1fb8f3de6912dd6e2064f832bd5a393bbc /src/southbridge/intel/ich5r/i82801er_watchdog.c | |
parent | 44f72eb3a3d07ec3c775b748f6a2a16e9e0a3e75 (diff) |
break the tree really quick due to svn restrictions, next commit fill fix it
again.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2240 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/southbridge/intel/ich5r/i82801er_watchdog.c')
-rw-r--r-- | src/southbridge/intel/ich5r/i82801er_watchdog.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/southbridge/intel/ich5r/i82801er_watchdog.c b/src/southbridge/intel/ich5r/i82801er_watchdog.c new file mode 100644 index 0000000000..c9c09f5896 --- /dev/null +++ b/src/southbridge/intel/ich5r/i82801er_watchdog.c @@ -0,0 +1,28 @@ +#include <console/console.h> +#include <arch/io.h> +#include <device/device.h> +#include <device/pci.h> + +void watchdog_off(void) +{ + device_t dev; + unsigned long value,base; + + /* turn off the ICH5 watchdog */ + dev = dev_find_slot(0, PCI_DEVFN(0x1f,0)); + /* Enable I/O space */ + value = pci_read_config16(dev, 0x04); + value |= (1 << 10); + pci_write_config16(dev, 0x04, value); + /* Get TCO base */ + base = (pci_read_config32(dev, 0x40) & 0x0fffe) + 0x60; + /* Disable the watchdog timer */ + value = inw(base + 0x08); + value |= 1 << 11; + outw(value, base + 0x08); + /* Clear TCO timeout status */ + outw(0x0008, base + 0x04); + outw(0x0002, base + 0x06); + printk_debug("Watchdog ICH5 disabled\r\n"); +} + |