Source
x
/*
* i6300esb: Watchdog timer driver for Intel 6300ESB chipset
*
* (c) Copyright 2004 Google Inc.
* (c) Copyright 2005 David Härdeman <david@2gen.com>
*
* 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.
*
* based on i810-tco.c which is in turn based on softdog.c
*
* The timer is implemented in the following I/O controller hubs:
* (See the intel documentation on http://developer.intel.com.)
* 6300ESB chip : document number 300641-004
*
* 2004YYZZ Ross Biro
* Initial version 0.01
* 2004YYZZ Ross Biro
* Version 0.02
* 20050210 David Härdeman <david@2gen.com>
* Ported driver to kernel 2.6
* 20171016 Radu Rendec <rrendec@arista.com>
* Change driver to use the watchdog subsystem
* Add support for multiple 6300ESB devices
*/
/*
* Includes, defines, variables, module parameters, ...
*/
/* Module and version information */
/* PCI configuration registers */
/* Config register */
/* WDT lock register */
/* Memory mapped registers */
/* Timer1 value after each reset */
/* Timer2 value after each reset */
/* General Interrupt Status Reg */
/* Reload register */
/* Lock register bits */
/* Watchdog functionality */
/* Enable WDT */
/* Lock (nowayout) */
/* Config register bits */
/* Enable reboot on timeout */
/* Decrement frequency */
/* Interrupt type on timer1 timeout */
/* Reload register bits */
/* Watchdog timed out */
/* prevent timeout */
/* Magic constants */
/* Step 1 to unlock reset registers */
/* Step 2 to unlock reset registers */
/* module parameters */
/* 30 sec default heartbeat (1 < heartbeat < 2*1023) */
static int heartbeat; /* in seconds */
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat,
"Watchdog heartbeat in seconds. (" ESB_HEARTBEAT_RANGE
", default=" __MODULE_STRING(ESB_HEARTBEAT_DEFAULT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="