P?]q*KViM /*
*'exvY~ * Industrial Computer Source WDT501 driver
L/<Up *
q &jW{ * (c) Copyright 1996-1997 Alan Cox <
alan@lxorguk.ukuu.org.uk>,
/=7 |FtB` * All Rights Reserved.
cJE2z2uW0 *
-U*XA * This program is free software; you can redistribute it and/or
C:
e}}8i * modify it under the terms of the GNU General Public License
*q8W;WaL * as published by the Free Software Foundation; either version
WWE?U-o * 2 of the License, or (at your option) any later version.
YrZAy5\ *
06Uxd\E~ * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
3)dT+lZ * warranty for any of this software. This material is provided
!4oYQB * "AS-IS" and at no charge.
Eda
sGCo *
o_\b{<^I * (c) Copyright 1995 Alan Cox <
alan@lxorguk.ukuu.org.uk>
Y`(I};MO *
A]=?fyPh{' * Release 0.10.
MgtyO3GUAD *
9=JU&/! * Fixes
c#{<|
. * Dave Gregorich : Modularisation and minor bugs
qRB%G<H * Alan Cox : Added the watchdog ioctl() stuff
NPS=?5p> * Alan Cox : Fixed the reboot problem (as noted by
(<%i8xu2 * Matt Crocker).
4&t6 * Alan Cox : Added wdt= boot option
R^8Opf_UN * Alan Cox : Cleaned up copy/user stuff
Bpk%,*$*) * Tim Hockin : Added insmod parameters, comment
*xLMs(gg * cleanup, parameterized timeout
88G[XkL$2 * Tigran Aivazian : Restructured wdt_init() to handle
C<n.C*o * failures
jq =-Y * Joel Becker : Added WDIOC_GET/SETTIMEOUT
fylaH(LER * Matt Domsch : Added nowayout module option
YnI */
K5w22L^=+ $X\BO& #include <linux/interrupt.h>
=M(\ R8 #include <linux/module.h>
_n{N3da #include <linux/moduleparam.h>
gNZ^TeT #include <linux/types.h>
46e;UUf!d #include <linux/miscdevice.h>
GXHk{G@TS #include <linux/watchdog.h>
N8nyTPw #include <linux/fs.h>
C($`'~b #include <linux/ioport.h>
c~C :"g.y #include <linux/notifier.h>
3q1O:b^eo #include <linux/reboot.h>
9qqEr~ #include <linux/init.h>
.vT'hu
#include <linux/io.h>
Rj E,Wn #include <linux/uaccess.h>
VUNQ@{ST|1 %F}`;>C3 #include <asm/system.h>
;G},xDGO_m #include "wd501p.h"
/pyKTZ| w=^*)jZ8 static unsigned long wdt_is_open;
UT^t7MY#O static char expect_close;
nh E!Pk *~:@xMa /*
}xdI{E1 q) * Module parameters
H%%#^rb^ */
M#|TQa N {yG)Ii #define WD_TIMO 60 /* Default heartbeat = 60 seconds */
&.4lhfI+(Q mIr{Wocx static int heartbeat = WD_TIMO;
pP".?|n static int wd_heartbeat;
Pq_Il9 module_param(heartbeat, int, 0);
|Ec $% MODULE_PARM_DESC(heartbeat,
ipbVQ7 "Watchdog heartbeat in seconds. (0 < heartbeat < 65536, default="
%b!p{p __MODULE_STRING(WD_TIMO) ")");
,cm2uY 2nEj
X\BY static int nowayout = WATCHDOG_NOWAYOUT;
:'rXu6c- module_param(nowayout, int, 0);
RcHyePuF)R MODULE_PARM_DESC(nowayout,
_nTjCN625 "Watchdog cannot be stopped once started (default="
+T4<