Commit 456c7301 authored by Mike Waychison's avatar Mike Waychison Committed by Wim Van Sebroeck

watchdog: Add TCO support for nVidia chipsets

This driver adds support for /dev/watchdog for boards using either the MCP51 or
MCP55 chipsets.  These are also known as the nForce 430 and nForce 550.  This
driver is likely to work on other chipsets as well, though those are the only
two that have been tested.
Signed-off-by: default avatarMike Waychison <mikew@google.com>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 15e28bf1
......@@ -642,6 +642,24 @@ config PC87413_WDT
Most people will say N.
config NV_TCO
tristate "nVidia TCO Timer/Watchdog"
depends on X86 && PCI
---help---
Hardware driver for the TCO timer built into the nVidia Hub family
(such as the MCP51). The TCO (Total Cost of Ownership) timer is a
watchdog timer that will reboot the machine after its second
expiration. The expiration time can be configured with the
"heartbeat" parameter.
On some motherboards the driver may fail to reset the chipset's
NO_REBOOT flag which prevents the watchdog from rebooting the
machine. If this is the case you will get a kernel message like
"failed to reset NO_REBOOT flag, reboot disabled by hardware".
To compile this driver as a module, choose M here: the
module will be called nv_tco.
config RDC321X_WDT
tristate "RDC R-321x SoC watchdog"
depends on X86_RDC321X
......
......@@ -87,6 +87,7 @@ obj-$(CONFIG_HP_WATCHDOG) += hpwdt.o
obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o
obj-$(CONFIG_SCx200_WDT) += scx200_wdt.o
obj-$(CONFIG_PC87413_WDT) += pc87413_wdt.o
obj-$(CONFIG_NV_TCO) += nv_tco.o
obj-$(CONFIG_RDC321X_WDT) += rdc321x_wdt.o
obj-$(CONFIG_60XX_WDT) += sbc60xxwdt.o
obj-$(CONFIG_SBC8360_WDT) += sbc8360.o
......
This diff is collapsed.
/*
* nv_tco: TCO timer driver for nVidia chipsets.
*
* (c) Copyright 2005 Google Inc., All Rights Reserved.
*
* Supported Chipsets:
* - MCP51/MCP55
*
* (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>, All Rights
* Reserved.
* http://www.kernelconcepts.de
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Neither kernel concepts nor Nils Faerber admit liability nor provide
* warranty for any of this software. This material is provided
* "AS-IS" and at no charge.
*
* (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>
* developed for
* Jentro AG, Haar/Munich (Germany)
*
* TCO timer driver for NV chipsets
* based on softdog.c by Alan Cox <alan@redhat.com>
*/
/*
* Some address definitions for the TCO
*/
#define TCO_RLD(base) ((base) + 0x00) /* TCO Timer Reload and Current Value */
#define TCO_TMR(base) ((base) + 0x01) /* TCO Timer Initial Value */
#define TCO_STS(base) ((base) + 0x04) /* TCO Status Register */
/*
* TCO Boot Status bit: set on TCO reset, reset by software or standby
* power-good (survives reboots), unfortunately this bit is never
* set.
*/
# define TCO_STS_BOOT_STS (1 << 9)
/*
* first and 2nd timeout status bits, these also survive a warm boot,
* and they work, so we use them.
*/
# define TCO_STS_TCO_INT_STS (1 << 1)
# define TCO_STS_TCO2TO_STS (1 << 10)
# define TCO_STS_RESET (TCO_STS_BOOT_STS | TCO_STS_TCO2TO_STS | \
TCO_STS_TCO_INT_STS)
#define TCO_CNT(base) ((base) + 0x08) /* TCO Control Register */
# define TCO_CNT_TCOHALT (1 << 12)
#define MCP51_SMBUS_SETUP_B 0xe8
# define MCP51_SMBUS_SETUP_B_TCO_REBOOT (1 << 25)
/*
* The SMI_EN register is at the base io address + 0x04,
* while TCOBASE is + 0x40.
*/
#define MCP51_SMI_EN(base) ((base) - 0x40 + 0x04)
# define MCP51_SMI_EN_TCO ((1 << 4) | (1 << 5))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment