aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/watchdog/pcwd-watchdog.txt8
-rw-r--r--Documentation/watchdog/watchdog-api.txt236
-rw-r--r--Documentation/watchdog/watchdog.txt94
-rw-r--r--Documentation/watchdog/wdt.txt43
4 files changed, 60 insertions, 321 deletions
diff --git a/Documentation/watchdog/pcwd-watchdog.txt b/Documentation/watchdog/pcwd-watchdog.txt
index d9ee6336c1d4..4f68052395c0 100644
--- a/Documentation/watchdog/pcwd-watchdog.txt
+++ b/Documentation/watchdog/pcwd-watchdog.txt
@@ -1,3 +1,5 @@
1Last reviewed: 10/05/2007
2
1 Berkshire Products PC Watchdog Card 3 Berkshire Products PC Watchdog Card
2 Support for ISA Cards Revision A and C 4 Support for ISA Cards Revision A and C
3 Documentation and Driver by Ken Hollis <kenji@bitgate.com> 5 Documentation and Driver by Ken Hollis <kenji@bitgate.com>
@@ -14,8 +16,8 @@
14 16
15 The Watchdog Driver will automatically find your watchdog card, and will 17 The Watchdog Driver will automatically find your watchdog card, and will
16 attach a running driver for use with that card. After the watchdog 18 attach a running driver for use with that card. After the watchdog
17 drivers have initialized, you can then talk to the card using the PC 19 drivers have initialized, you can then talk to the card using a PC
18 Watchdog program, available from http://ftp.bitgate.com/pcwd/. 20 Watchdog program.
19 21
20 I suggest putting a "watchdog -d" before the beginning of an fsck, and 22 I suggest putting a "watchdog -d" before the beginning of an fsck, and
21 a "watchdog -e -t 1" immediately after the end of an fsck. (Remember 23 a "watchdog -e -t 1" immediately after the end of an fsck. (Remember
@@ -62,5 +64,3 @@
62 -- Ken Hollis 64 -- Ken Hollis
63 (kenji@bitgate.com) 65 (kenji@bitgate.com)
64 66
65(This documentation may be out of date. Check
66 http://ftp.bitgate.com/pcwd/ for the absolute latest additions.)
diff --git a/Documentation/watchdog/watchdog-api.txt b/Documentation/watchdog/watchdog-api.txt
index 8d16f6f3c4ec..bb7cb1d31ec7 100644
--- a/Documentation/watchdog/watchdog-api.txt
+++ b/Documentation/watchdog/watchdog-api.txt
@@ -1,3 +1,6 @@
1Last reviewed: 10/05/2007
2
3
1The Linux Watchdog driver API. 4The Linux Watchdog driver API.
2 5
3Copyright 2002 Christer Weingel <wingel@nano-system.com> 6Copyright 2002 Christer Weingel <wingel@nano-system.com>
@@ -22,7 +25,7 @@ the system. If userspace fails (RAM error, kernel bug, whatever), the
22notifications cease to occur, and the hardware watchdog will reset the 25notifications cease to occur, and the hardware watchdog will reset the
23system (causing a reboot) after the timeout occurs. 26system (causing a reboot) after the timeout occurs.
24 27
25The Linux watchdog API is a rather AD hoc construction and different 28The Linux watchdog API is a rather ad-hoc construction and different
26drivers implement different, and sometimes incompatible, parts of it. 29drivers implement different, and sometimes incompatible, parts of it.
27This file is an attempt to document the existing usage and allow 30This file is an attempt to document the existing usage and allow
28future driver writers to use it as a reference. 31future driver writers to use it as a reference.
@@ -46,14 +49,16 @@ some of the drivers support the configuration option "Disable watchdog
46shutdown on close", CONFIG_WATCHDOG_NOWAYOUT. If it is set to Y when 49shutdown on close", CONFIG_WATCHDOG_NOWAYOUT. If it is set to Y when
47compiling the kernel, there is no way of disabling the watchdog once 50compiling the kernel, there is no way of disabling the watchdog once
48it has been started. So, if the watchdog daemon crashes, the system 51it has been started. So, if the watchdog daemon crashes, the system
49will reboot after the timeout has passed. 52will reboot after the timeout has passed. Watchdog devices also usually
53support the nowayout module parameter so that this option can be controlled
54at runtime.
50 55
51Some other drivers will not disable the watchdog, unless a specific 56Drivers will not disable the watchdog, unless a specific magic character 'V'
52magic character 'V' has been sent /dev/watchdog just before closing 57has been sent /dev/watchdog just before closing the file. If the userspace
53the file. If the userspace daemon closes the file without sending 58daemon closes the file without sending this special character, the driver
54this special character, the driver will assume that the daemon (and 59will assume that the daemon (and userspace in general) died, and will stop
55userspace in general) died, and will stop pinging the watchdog without 60pinging the watchdog without disabling it first. This will then cause a
56disabling it first. This will then cause a reboot. 61reboot if the watchdog is not re-opened in sufficient time.
57 62
58The ioctl API: 63The ioctl API:
59 64
@@ -227,218 +232,3 @@ The following options are available:
227 232
228[FIXME -- better explanations] 233[FIXME -- better explanations]
229 234
230Implementations in the current drivers in the kernel tree:
231
232Here I have tried to summarize what the different drivers support and
233where they do strange things compared to the other drivers.
234
235acquirewdt.c -- Acquire Single Board Computer
236
237 This driver has a hardcoded timeout of 1 minute
238
239 Supports CONFIG_WATCHDOG_NOWAYOUT
240
241 GETSUPPORT returns KEEPALIVEPING. GETSTATUS will return 1 if
242 the device is open, 0 if not. [FIXME -- isn't this rather
243 silly? To be able to use the ioctl, the device must be open
244 and so GETSTATUS will always return 1].
245
246advantechwdt.c -- Advantech Single Board Computer
247
248 Timeout that defaults to 60 seconds, supports SETTIMEOUT.
249
250 Supports CONFIG_WATCHDOG_NOWAYOUT
251
252 GETSUPPORT returns WDIOF_KEEPALIVEPING and WDIOF_SETTIMEOUT.
253 The GETSTATUS call returns if the device is open or not.
254 [FIXME -- silliness again?]
255
256booke_wdt.c -- PowerPC BookE Watchdog Timer
257
258 Timeout default varies according to frequency, supports
259 SETTIMEOUT
260
261 Watchdog cannot be turned off, CONFIG_WATCHDOG_NOWAYOUT
262 does not make sense
263
264 GETSUPPORT returns the watchdog_info struct, and
265 GETSTATUS returns the supported options. GETBOOTSTATUS
266 returns a 1 if the last reset was caused by the
267 watchdog and a 0 otherwise. This watchdog cannot be
268 disabled once it has been started. The wdt_period kernel
269 parameter selects which bit of the time base changing
270 from 0->1 will trigger the watchdog exception. Changing
271 the timeout from the ioctl calls will change the
272 wdt_period as defined above. Finally if you would like to
273 replace the default Watchdog Handler you can implement the
274 WatchdogHandler() function in your own code.
275
276eurotechwdt.c -- Eurotech CPU-1220/1410
277
278 The timeout can be set using the SETTIMEOUT ioctl and defaults
279 to 60 seconds.
280
281 Also has a module parameter "ev", event type which controls
282 what should happen on a timeout, the string "int" or anything
283 else that causes a reboot. [FIXME -- better description]
284
285 Supports CONFIG_WATCHDOG_NOWAYOUT
286
287 GETSUPPORT returns CARDRESET and WDIOF_SETTIMEOUT but
288 GETSTATUS is not supported and GETBOOTSTATUS just returns 0.
289
290i810-tco.c -- Intel 810 chipset
291
292 Also has support for a lot of other i8x0 stuff, but the
293 watchdog is one of the things.
294
295 The timeout is set using the module parameter "i810_margin",
296 which is in steps of 0.6 seconds where 2<i810_margin<64. The
297 driver supports the SETTIMEOUT ioctl.
298
299 Supports CONFIG_WATCHDOG_NOWAYOUT.
300
301 GETSUPPORT returns WDIOF_SETTIMEOUT. The GETSTATUS call
302 returns some kind of timer value which ist not compatible with
303 the other drivers. GETBOOT status returns some kind of
304 hardware specific boot status. [FIXME -- describe this]
305
306ib700wdt.c -- IB700 Single Board Computer
307
308 Default timeout of 30 seconds and the timeout is settable
309 using the SETTIMEOUT ioctl. Note that only a few timeout
310 values are supported.
311
312 Supports CONFIG_WATCHDOG_NOWAYOUT
313
314 GETSUPPORT returns WDIOF_KEEPALIVEPING and WDIOF_SETTIMEOUT.
315 The GETSTATUS call returns if the device is open or not.
316 [FIXME -- silliness again?]
317
318machzwd.c -- MachZ ZF-Logic
319
320 Hardcoded timeout of 10 seconds
321
322 Has a module parameter "action" that controls what happens
323 when the timeout runs out which can be 0 = RESET (default),
324 1 = SMI, 2 = NMI, 3 = SCI.
325
326 Supports CONFIG_WATCHDOG_NOWAYOUT and the magic character
327 'V' close handling.
328
329 GETSUPPORT returns WDIOF_KEEPALIVEPING, and the GETSTATUS call
330 returns if the device is open or not. [FIXME -- silliness
331 again?]
332
333mixcomwd.c -- MixCom Watchdog
334
335 [FIXME -- I'm unable to tell what the timeout is]
336
337 Supports CONFIG_WATCHDOG_NOWAYOUT
338
339 GETSUPPORT returns WDIOF_KEEPALIVEPING, GETSTATUS returns if
340 the device is opened or not [FIXME -- I'm not really sure how
341 this works, there seems to be some magic connected to
342 CONFIG_WATCHDOG_NOWAYOUT]
343
344pcwd.c -- Berkshire PC Watchdog
345
346 Hardcoded timeout of 1.5 seconds
347
348 Supports CONFIG_WATCHDOG_NOWAYOUT
349
350 GETSUPPORT returns WDIOF_OVERHEAT|WDIOF_CARDRESET and both
351 GETSTATUS and GETBOOTSTATUS return something useful.
352
353 The SETOPTIONS call can be used to enable and disable the card
354 and to ask the driver to call panic if the system overheats.
355
356sbc60xxwdt.c -- 60xx Single Board Computer
357
358 Hardcoded timeout of 10 seconds
359
360 Does not support CONFIG_WATCHDOG_NOWAYOUT, but has the magic
361 character 'V' close handling.
362
363 No bits set in GETSUPPORT
364
365scx200.c -- National SCx200 CPUs
366
367 Not in the kernel yet.
368
369 The timeout is set using a module parameter "margin" which
370 defaults to 60 seconds. The timeout can also be set using
371 SETTIMEOUT and read using GETTIMEOUT.
372
373 Supports a module parameter "nowayout" that is initialized
374 with the value of CONFIG_WATCHDOG_NOWAYOUT. Also supports the
375 magic character 'V' handling.
376
377shwdt.c -- SuperH 3/4 processors
378
379 [FIXME -- I'm unable to tell what the timeout is]
380
381 Supports CONFIG_WATCHDOG_NOWAYOUT
382
383 GETSUPPORT returns WDIOF_KEEPALIVEPING, and the GETSTATUS call
384 returns if the device is open or not. [FIXME -- silliness
385 again?]
386
387softdog.c -- Software watchdog
388
389 The timeout is set with the module parameter "soft_margin"
390 which defaults to 60 seconds, the timeout is also settable
391 using the SETTIMEOUT ioctl.
392
393 Supports CONFIG_WATCHDOG_NOWAYOUT
394
395 WDIOF_SETTIMEOUT bit set in GETSUPPORT
396
397w83877f_wdt.c -- W83877F Computer
398
399 Hardcoded timeout of 30 seconds
400
401 Does not support CONFIG_WATCHDOG_NOWAYOUT, but has the magic
402 character 'V' close handling.
403
404 No bits set in GETSUPPORT
405
406w83627hf_wdt.c -- w83627hf watchdog
407
408 Timeout that defaults to 60 seconds, supports SETTIMEOUT.
409
410 Supports CONFIG_WATCHDOG_NOWAYOUT
411
412 GETSUPPORT returns WDIOF_KEEPALIVEPING and WDIOF_SETTIMEOUT.
413 The GETSTATUS call returns if the device is open or not.
414
415wdt.c -- ICS WDT500/501 ISA and
416wdt_pci.c -- ICS WDT500/501 PCI
417
418 Default timeout of 60 seconds. The timeout is also settable
419 using the SETTIMEOUT ioctl.
420
421 Supports CONFIG_WATCHDOG_NOWAYOUT
422
423 GETSUPPORT returns with bits set depending on the actual
424 card. The WDT501 supports a lot of external monitoring, the
425 WDT500 much less.
426
427wdt285.c -- Footbridge watchdog
428
429 The timeout is set with the module parameter "soft_margin"
430 which defaults to 60 seconds. The timeout is also settable
431 using the SETTIMEOUT ioctl.
432
433 Does not support CONFIG_WATCHDOG_NOWAYOUT
434
435 WDIOF_SETTIMEOUT bit set in GETSUPPORT
436
437wdt977.c -- Netwinder W83977AF chip
438
439 Hardcoded timeout of 3 minutes
440
441 Supports CONFIG_WATCHDOG_NOWAYOUT
442
443 Does not support any ioctls at all.
444
diff --git a/Documentation/watchdog/watchdog.txt b/Documentation/watchdog/watchdog.txt
deleted file mode 100644
index 4b1ff69cc19a..000000000000
--- a/Documentation/watchdog/watchdog.txt
+++ /dev/null
@@ -1,94 +0,0 @@
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: see Documentation/watchdog/src/watchdog-simple.c
69
70
71Contact Information
72
73People keep asking about the WDT watchdog timer hardware: The phone contacts
74for Industrial Computer Source are:
75
76Industrial Computer Source
77http://www.indcompsrc.com
78ICS Advent, San Diego
796260 Sequence Dr.
80San Diego, CA 92121-4371
81Phone (858) 677-0877
82FAX: (858) 677-0895
83>
84ICS Advent Europe, UK
85Oving Road
86Chichester,
87West Sussex,
88PO19 4ET, UK
89Phone: 00.44.1243.533900
90
91
92and please mention Linux when enquiring.
93
94For full information about the PCWD cards see the pcwd-watchdog.txt document.
diff --git a/Documentation/watchdog/wdt.txt b/Documentation/watchdog/wdt.txt
new file mode 100644
index 000000000000..03fd756d976d
--- /dev/null
+++ b/Documentation/watchdog/wdt.txt
@@ -0,0 +1,43 @@
1Last Reviewed: 10/05/2007
2
3 WDT Watchdog Timer Interfaces For The Linux Operating System
4 Alan Cox <alan@lxorguk.ukuu.org.uk>
5
6 ICS WDT501-P
7 ICS WDT501-P (no fan tachometer)
8 ICS WDT500-P
9
10All the interfaces provide /dev/watchdog, which when open must be written
11to within a timeout or the machine will reboot. Each write delays the reboot
12time another timeout. In the case of the software watchdog the ability to
13reboot will depend on the state of the machines and interrupts. The hardware
14boards physically pull the machine down off their own onboard timers and
15will reboot from almost anything.
16
17A second temperature monitoring interface is available on the WDT501P cards
18This provides /dev/temperature. This is the machine internal temperature in
19degrees Fahrenheit. Each read returns a single byte giving the temperature.
20
21The third interface logs kernel messages on additional alert events.
22
23The wdt card cannot be safely probed for. Instead you need to pass
24wdt=ioaddr,irq as a boot parameter - eg "wdt=0x240,11".
25
26Features
27--------
28 WDT501P WDT500P
29Reboot Timer X X
30External Reboot X X
31I/O Port Monitor o o
32Temperature X o
33Fan Speed X o
34Power Under X o
35Power Over X o
36Overheat X o
37
38The external event interfaces on the WDT boards are not currently supported.
39Minor numbers are however allocated for it.
40
41
42Example Watchdog Driver: see Documentation/watchdog/src/watchdog-simple.c
43