aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/watchdog/watchdog.txt
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /Documentation/watchdog/watchdog.txt
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'Documentation/watchdog/watchdog.txt')
-rw-r--r--Documentation/watchdog/watchdog.txt115
1 files changed, 115 insertions, 0 deletions
diff --git a/Documentation/watchdog/watchdog.txt b/Documentation/watchdog/watchdog.txt
new file mode 100644
index 000000000000..dffda29c8799
--- /dev/null
+++ b/Documentation/watchdog/watchdog.txt
@@ -0,0 +1,115 @@
1 Watchdog Timer Interfaces For The Linux Operating System
2
3 Alan Cox <alan@lxorguk.ukuu.org.uk>
4
5 Custom Linux Driver And Program Development
6
7
8The following watchdog drivers are currently implemented:
9
10 ICS WDT501-P
11 ICS WDT501-P (no fan tachometer)
12 ICS WDT500-P
13 Software Only
14 SA1100 Internal Watchdog
15 Berkshire Products PC Watchdog Revision A & C (by Ken Hollis)
16
17
18All six interfaces provide /dev/watchdog, which when open must be written
19to within a timeout or the machine will reboot. Each write delays the reboot
20time another timeout. In the case of the software watchdog the ability to
21reboot will depend on the state of the machines and interrupts. The hardware
22boards physically pull the machine down off their own onboard timers and
23will reboot from almost anything.
24
25A second temperature monitoring interface is available on the WDT501P cards
26and some Berkshire cards. This provides /dev/temperature. This is the machine
27internal temperature in degrees Fahrenheit. Each read returns a single byte
28giving the temperature.
29
30The third interface logs kernel messages on additional alert events.
31
32Both software and hardware watchdog drivers are available in the standard
33kernel. If you are using the software watchdog, you probably also want
34to use "panic=60" as a boot argument as well.
35
36The wdt card cannot be safely probed for. Instead you need to pass
37wdt=ioaddr,irq as a boot parameter - eg "wdt=0x240,11".
38
39The SA1100 watchdog module can be configured with the "sa1100_margin"
40commandline argument which specifies timeout value in seconds.
41
42The i810 TCO watchdog modules can be configured with the "i810_margin"
43commandline argument which specifies the counter initial value. The counter
44is decremented every 0.6 seconds and default to 50 (30 seconds). Values can
45range between 3 and 63.
46
47The i810 TCO watchdog driver also implements the WDIOC_GETSTATUS and
48WDIOC_GETBOOTSTATUS ioctl()s. WDIOC_GETSTATUS returns the actual counter value
49and WDIOC_GETBOOTSTATUS returns the value of TCO2 Status Register (see Intel's
50documentation for the 82801AA and 82801AB datasheet).
51
52Features
53--------
54 WDT501P WDT500P Software Berkshire i810 TCO SA1100WD
55Reboot Timer X X X X X X
56External Reboot X X o o o X
57I/O Port Monitor o o o X o o
58Temperature X o o X o o
59Fan Speed X o o o o o
60Power Under X o o o o o
61Power Over X o o o o o
62Overheat X o o o o o
63
64The external event interfaces on the WDT boards are not currently supported.
65Minor numbers are however allocated for it.
66
67
68Example Watchdog Driver
69-----------------------
70
71#include <stdio.h>
72#include <unistd.h>
73#include <fcntl.h>
74
75int main(int argc, const char *argv[])
76{
77 int fd=open("/dev/watchdog",O_WRONLY);
78 if(fd==-1)
79 {
80 perror("watchdog");
81 exit(1);
82 }
83 while(1)
84 {
85 write(fd,"\0",1);
86 fsync(fd);
87 sleep(10);
88 }
89}
90
91
92Contact Information
93
94People keep asking about the WDT watchdog timer hardware: The phone contacts
95for Industrial Computer Source are:
96
97Industrial Computer Source
98http://www.indcompsrc.com
99ICS Advent, San Diego
1006260 Sequence Dr.
101San Diego, CA 92121-4371
102Phone (858) 677-0877
103FAX: (858) 677-0895
104>
105ICS Advent Europe, UK
106Oving Road
107Chichester,
108West Sussex,
109PO19 4ET, UK
110Phone: 00.44.1243.533900
111
112
113and please mention Linux when enquiring.
114
115For full information about the PCWD cards see the pcwd-watchdog.txt document.