1 #include <device/pnp_def.h>
3 #define NSC_WD_DEV PNP_DEV(0x2e, 0xa)
4 #define NSC_WDBASE 0x600
5 #define ICH5_WDBASE 0x400
6 #define ICH5_GPIOBASE 0x500
8 static void disable_esb6300_watchdog(void)
10 /* FIXME move me somewhere more appropriate */
12 unsigned long value, base;
13 dev = pci_locate_device(PCI_ID(0x8086, 0x25a1), 0);
14 if (dev == PCI_DEV_INVALID) {
15 die("Missing 6300ESB?");
17 /* Enable I/O space */
18 value = pci_read_config16(dev, 0x04);
20 pci_write_config16(dev, 0x04, value);
22 /* Set and enable acpibase */
23 pci_write_config32(dev, 0x40, ICH5_WDBASE | 1);
24 pci_write_config8(dev, 0x44, 0x10);
25 base = ICH5_WDBASE + 0x60;
27 /* Set bit 11 in TCO1_CNT */
28 value = inw(base + 0x08);
30 outw(value, base + 0x08);
32 /* Clear TCO timeout status */
33 outw(0x0008, base + 0x04);
34 outw(0x0002, base + 0x06);
37 static void disable_watchdogs(void)
39 disable_esb6300_watchdog();
40 print_debug("Watchdogs disabled\n");