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 modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 static void i82801ax_halt_tco_timer(void)
24 uint16_t halt_tco_timer;
26 /* Set the LPC device statically. */
27 dev = PCI_DEV(0x0, 0x1f, 0x0);
29 /* Temporarily set ACPI base address (I/O space). */
30 pci_write_config32(dev, PMBASE, (PMBASE_ADDR | 1));
32 /* Temporarily enable ACPI I/O. */
33 pci_write_config8(dev, ACPI_CNTL, 0x10);
35 /* Halt the TCO timer, preventing SMI and automatic reboot */
36 outw(inw(PMBASE_ADDR + TCOBASE + TCO1_CNT) | (1 << 11), PMBASE_ADDR + TCOBASE + TCO1_CNT);
38 /* Disable ACPI I/O. */
39 pci_write_config8(dev, ACPI_CNTL, 0x00);