2 * This file is part of the coreboot project.
4 * Copyright (C) 2008 Joseph Smith <joe@settoplinux.org>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
22 static void i82801dx_halt_tco_timer(void)
25 uint16_t halt_tco_timer;
27 /* Set the LPC device statically. */
28 dev = PCI_DEV(0x0, 0x1f, 0x0);
30 /* Temporarily set ACPI base address (I/O space). */
31 pci_write_config32(dev, PMBASE, (PMBASE_ADDR | 1));
33 /* Enable ACPI I/O. */
34 pci_write_config8(dev, ACPI_CNTL, 0x10);
36 /* Halt the TCO timer, preventing SMI and automatic reboot */
37 outw(inw(PMBASE_ADDR + TCOBASE + TCO1_CNT) | (1 << 11),
38 PMBASE_ADDR + TCOBASE + TCO1_CNT);