···11+Last reviewed: 10/05/200722+13 Berkshire Products PC Watchdog Card24 Support for ISA Cards Revision A and C35 Documentation and Driver by Ken Hollis <kenji@bitgate.com>···16141715 The Watchdog Driver will automatically find your watchdog card, and will1816 attach a running driver for use with that card. After the watchdog1919- drivers have initialized, you can then talk to the card using the PC2020- Watchdog program, available from http://ftp.bitgate.com/pcwd/.1717+ drivers have initialized, you can then talk to the card using a PC1818+ Watchdog program.21192220 I suggest putting a "watchdog -d" before the beginning of an fsck, and2321 a "watchdog -e -t 1" immediately after the end of an fsck. (Remember···6462 -- Ken Hollis6563 (kenji@bitgate.com)66646767-(This documentation may be out of date. Check6868- http://ftp.bitgate.com/pcwd/ for the absolute latest additions.)
+13-223
Documentation/watchdog/watchdog-api.txt
···11+Last reviewed: 10/05/200722+33+14The Linux Watchdog driver API.2536Copyright 2002 Christer Weingel <wingel@nano-system.com>···2522notifications cease to occur, and the hardware watchdog will reset the2623system (causing a reboot) after the timeout occurs.27242828-The Linux watchdog API is a rather AD hoc construction and different2525+The Linux watchdog API is a rather ad-hoc construction and different2926drivers implement different, and sometimes incompatible, parts of it.3027This file is an attempt to document the existing usage and allow3128future driver writers to use it as a reference.···4946shutdown on close", CONFIG_WATCHDOG_NOWAYOUT. If it is set to Y when5047compiling the kernel, there is no way of disabling the watchdog once5148it has been started. So, if the watchdog daemon crashes, the system5252-will reboot after the timeout has passed.4949+will reboot after the timeout has passed. Watchdog devices also usually5050+support the nowayout module parameter so that this option can be controlled5151+at runtime.53525454-Some other drivers will not disable the watchdog, unless a specific5555-magic character 'V' has been sent /dev/watchdog just before closing5656-the file. If the userspace daemon closes the file without sending5757-this special character, the driver will assume that the daemon (and5858-userspace in general) died, and will stop pinging the watchdog without5959-disabling it first. This will then cause a reboot.5353+Drivers will not disable the watchdog, unless a specific magic character 'V'5454+has been sent /dev/watchdog just before closing the file. If the userspace5555+daemon closes the file without sending this special character, the driver5656+will assume that the daemon (and userspace in general) died, and will stop5757+pinging the watchdog without disabling it first. This will then cause a5858+reboot if the watchdog is not re-opened in sufficient time.60596160The ioctl API:6261···231226 WDIOS_TEMPPANIC Kernel panic on temperature trip232227233228[FIXME -- better explanations]234234-235235-Implementations in the current drivers in the kernel tree:236236-237237-Here I have tried to summarize what the different drivers support and238238-where they do strange things compared to the other drivers.239239-240240-acquirewdt.c -- Acquire Single Board Computer241241-242242- This driver has a hardcoded timeout of 1 minute243243-244244- Supports CONFIG_WATCHDOG_NOWAYOUT245245-246246- GETSUPPORT returns KEEPALIVEPING. GETSTATUS will return 1 if247247- the device is open, 0 if not. [FIXME -- isn't this rather248248- silly? To be able to use the ioctl, the device must be open249249- and so GETSTATUS will always return 1].250250-251251-advantechwdt.c -- Advantech Single Board Computer252252-253253- Timeout that defaults to 60 seconds, supports SETTIMEOUT.254254-255255- Supports CONFIG_WATCHDOG_NOWAYOUT256256-257257- GETSUPPORT returns WDIOF_KEEPALIVEPING and WDIOF_SETTIMEOUT.258258- The GETSTATUS call returns if the device is open or not.259259- [FIXME -- silliness again?]260260-261261-booke_wdt.c -- PowerPC BookE Watchdog Timer262262-263263- Timeout default varies according to frequency, supports264264- SETTIMEOUT265265-266266- Watchdog cannot be turned off, CONFIG_WATCHDOG_NOWAYOUT267267- does not make sense268268-269269- GETSUPPORT returns the watchdog_info struct, and270270- GETSTATUS returns the supported options. GETBOOTSTATUS271271- returns a 1 if the last reset was caused by the272272- watchdog and a 0 otherwise. This watchdog cannot be273273- disabled once it has been started. The wdt_period kernel274274- parameter selects which bit of the time base changing275275- from 0->1 will trigger the watchdog exception. Changing276276- the timeout from the ioctl calls will change the277277- wdt_period as defined above. Finally if you would like to278278- replace the default Watchdog Handler you can implement the279279- WatchdogHandler() function in your own code.280280-281281-eurotechwdt.c -- Eurotech CPU-1220/1410282282-283283- The timeout can be set using the SETTIMEOUT ioctl and defaults284284- to 60 seconds.285285-286286- Also has a module parameter "ev", event type which controls287287- what should happen on a timeout, the string "int" or anything288288- else that causes a reboot. [FIXME -- better description]289289-290290- Supports CONFIG_WATCHDOG_NOWAYOUT291291-292292- GETSUPPORT returns CARDRESET and WDIOF_SETTIMEOUT but293293- GETSTATUS is not supported and GETBOOTSTATUS just returns 0.294294-295295-i810-tco.c -- Intel 810 chipset296296-297297- Also has support for a lot of other i8x0 stuff, but the298298- watchdog is one of the things.299299-300300- The timeout is set using the module parameter "i810_margin",301301- which is in steps of 0.6 seconds where 2<i810_margin<64. The302302- driver supports the SETTIMEOUT ioctl.303303-304304- Supports CONFIG_WATCHDOG_NOWAYOUT.305305-306306- GETSUPPORT returns WDIOF_SETTIMEOUT. The GETSTATUS call307307- returns some kind of timer value which ist not compatible with308308- the other drivers. GETBOOT status returns some kind of309309- hardware specific boot status. [FIXME -- describe this]310310-311311-ib700wdt.c -- IB700 Single Board Computer312312-313313- Default timeout of 30 seconds and the timeout is settable314314- using the SETTIMEOUT ioctl. Note that only a few timeout315315- values are supported.316316-317317- Supports CONFIG_WATCHDOG_NOWAYOUT318318-319319- GETSUPPORT returns WDIOF_KEEPALIVEPING and WDIOF_SETTIMEOUT.320320- The GETSTATUS call returns if the device is open or not.321321- [FIXME -- silliness again?]322322-323323-machzwd.c -- MachZ ZF-Logic324324-325325- Hardcoded timeout of 10 seconds326326-327327- Has a module parameter "action" that controls what happens328328- when the timeout runs out which can be 0 = RESET (default), 329329- 1 = SMI, 2 = NMI, 3 = SCI.330330-331331- Supports CONFIG_WATCHDOG_NOWAYOUT and the magic character332332- 'V' close handling.333333-334334- GETSUPPORT returns WDIOF_KEEPALIVEPING, and the GETSTATUS call335335- returns if the device is open or not. [FIXME -- silliness336336- again?]337337-338338-mixcomwd.c -- MixCom Watchdog339339-340340- [FIXME -- I'm unable to tell what the timeout is]341341-342342- Supports CONFIG_WATCHDOG_NOWAYOUT343343-344344- GETSUPPORT returns WDIOF_KEEPALIVEPING, GETSTATUS returns if345345- the device is opened or not [FIXME -- I'm not really sure how346346- this works, there seems to be some magic connected to347347- CONFIG_WATCHDOG_NOWAYOUT]348348-349349-pcwd.c -- Berkshire PC Watchdog350350-351351- Hardcoded timeout of 1.5 seconds352352-353353- Supports CONFIG_WATCHDOG_NOWAYOUT354354-355355- GETSUPPORT returns WDIOF_OVERHEAT|WDIOF_CARDRESET and both356356- GETSTATUS and GETBOOTSTATUS return something useful.357357-358358- The SETOPTIONS call can be used to enable and disable the card359359- and to ask the driver to call panic if the system overheats.360360-361361-sbc60xxwdt.c -- 60xx Single Board Computer362362-363363- Hardcoded timeout of 10 seconds364364-365365- Does not support CONFIG_WATCHDOG_NOWAYOUT, but has the magic366366- character 'V' close handling.367367-368368- No bits set in GETSUPPORT369369-370370-scx200.c -- National SCx200 CPUs371371-372372- Not in the kernel yet.373373-374374- The timeout is set using a module parameter "margin" which375375- defaults to 60 seconds. The timeout can also be set using376376- SETTIMEOUT and read using GETTIMEOUT.377377-378378- Supports a module parameter "nowayout" that is initialized379379- with the value of CONFIG_WATCHDOG_NOWAYOUT. Also supports the380380- magic character 'V' handling.381381-382382-shwdt.c -- SuperH 3/4 processors383383-384384- [FIXME -- I'm unable to tell what the timeout is]385385-386386- Supports CONFIG_WATCHDOG_NOWAYOUT387387-388388- GETSUPPORT returns WDIOF_KEEPALIVEPING, and the GETSTATUS call389389- returns if the device is open or not. [FIXME -- silliness390390- again?]391391-392392-softdog.c -- Software watchdog393393-394394- The timeout is set with the module parameter "soft_margin"395395- which defaults to 60 seconds, the timeout is also settable396396- using the SETTIMEOUT ioctl.397397-398398- Supports CONFIG_WATCHDOG_NOWAYOUT399399-400400- WDIOF_SETTIMEOUT bit set in GETSUPPORT401401-402402-w83877f_wdt.c -- W83877F Computer403403-404404- Hardcoded timeout of 30 seconds405405-406406- Does not support CONFIG_WATCHDOG_NOWAYOUT, but has the magic407407- character 'V' close handling.408408-409409- No bits set in GETSUPPORT410410-411411-w83627hf_wdt.c -- w83627hf watchdog412412-413413- Timeout that defaults to 60 seconds, supports SETTIMEOUT.414414-415415- Supports CONFIG_WATCHDOG_NOWAYOUT416416-417417- GETSUPPORT returns WDIOF_KEEPALIVEPING and WDIOF_SETTIMEOUT.418418- The GETSTATUS call returns if the device is open or not.419419-420420-wdt.c -- ICS WDT500/501 ISA and421421-wdt_pci.c -- ICS WDT500/501 PCI422422-423423- Default timeout of 60 seconds. The timeout is also settable424424- using the SETTIMEOUT ioctl.425425-426426- Supports CONFIG_WATCHDOG_NOWAYOUT427427-428428- GETSUPPORT returns with bits set depending on the actual429429- card. The WDT501 supports a lot of external monitoring, the430430- WDT500 much less.431431-432432-wdt285.c -- Footbridge watchdog433433-434434- The timeout is set with the module parameter "soft_margin"435435- which defaults to 60 seconds. The timeout is also settable436436- using the SETTIMEOUT ioctl.437437-438438- Does not support CONFIG_WATCHDOG_NOWAYOUT439439-440440- WDIOF_SETTIMEOUT bit set in GETSUPPORT441441-442442-wdt977.c -- Netwinder W83977AF chip443443-444444- Hardcoded timeout of 3 minutes445445-446446- Supports CONFIG_WATCHDOG_NOWAYOUT447447-448448- Does not support any ioctls at all.449229
-94
Documentation/watchdog/watchdog.txt
···11- Watchdog Timer Interfaces For The Linux Operating System22-33- Alan Cox <alan@lxorguk.ukuu.org.uk>44-55- Custom Linux Driver And Program Development66-77-88-The following watchdog drivers are currently implemented:99-1010- ICS WDT501-P1111- ICS WDT501-P (no fan tachometer)1212- ICS WDT500-P1313- Software Only1414- SA1100 Internal Watchdog1515- Berkshire Products PC Watchdog Revision A & C (by Ken Hollis)1616-1717-1818-All six interfaces provide /dev/watchdog, which when open must be written1919-to within a timeout or the machine will reboot. Each write delays the reboot2020-time another timeout. In the case of the software watchdog the ability to 2121-reboot will depend on the state of the machines and interrupts. The hardware2222-boards physically pull the machine down off their own onboard timers and2323-will reboot from almost anything.2424-2525-A second temperature monitoring interface is available on the WDT501P cards2626-and some Berkshire cards. This provides /dev/temperature. This is the machine 2727-internal temperature in degrees Fahrenheit. Each read returns a single byte 2828-giving the temperature.2929-3030-The third interface logs kernel messages on additional alert events.3131-3232-Both software and hardware watchdog drivers are available in the standard3333-kernel. If you are using the software watchdog, you probably also want3434-to use "panic=60" as a boot argument as well.3535-3636-The wdt card cannot be safely probed for. Instead you need to pass3737-wdt=ioaddr,irq as a boot parameter - eg "wdt=0x240,11".3838-3939-The SA1100 watchdog module can be configured with the "sa1100_margin"4040-commandline argument which specifies timeout value in seconds.4141-4242-The i810 TCO watchdog modules can be configured with the "i810_margin"4343-commandline argument which specifies the counter initial value. The counter4444-is decremented every 0.6 seconds and default to 50 (30 seconds). Values can4545-range between 3 and 63.4646-4747-The i810 TCO watchdog driver also implements the WDIOC_GETSTATUS and4848-WDIOC_GETBOOTSTATUS ioctl()s. WDIOC_GETSTATUS returns the actual counter value4949-and WDIOC_GETBOOTSTATUS returns the value of TCO2 Status Register (see Intel's5050-documentation for the 82801AA and 82801AB datasheet). 5151-5252-Features5353---------5454- WDT501P WDT500P Software Berkshire i810 TCO SA1100WD5555-Reboot Timer X X X X X X5656-External Reboot X X o o o X5757-I/O Port Monitor o o o X o o5858-Temperature X o o X o o5959-Fan Speed X o o o o o6060-Power Under X o o o o o6161-Power Over X o o o o o6262-Overheat X o o o o o6363-6464-The external event interfaces on the WDT boards are not currently supported.6565-Minor numbers are however allocated for it.6666-6767-6868-Example Watchdog Driver: see Documentation/watchdog/src/watchdog-simple.c6969-7070-7171-Contact Information7272-7373-People keep asking about the WDT watchdog timer hardware: The phone contacts7474-for Industrial Computer Source are:7575-7676-Industrial Computer Source7777-http://www.indcompsrc.com7878-ICS Advent, San Diego7979-6260 Sequence Dr.8080-San Diego, CA 92121-43718181-Phone (858) 677-08778282-FAX: (858) 677-08958383->8484-ICS Advent Europe, UK8585-Oving Road8686-Chichester,8787-West Sussex,8888-PO19 4ET, UK8989-Phone: 00.44.1243.5339009090-9191-9292-and please mention Linux when enquiring.9393-9494-For full information about the PCWD cards see the pcwd-watchdog.txt document.
+43
Documentation/watchdog/wdt.txt
···11+Last Reviewed: 10/05/200722+33+ WDT Watchdog Timer Interfaces For The Linux Operating System44+ Alan Cox <alan@lxorguk.ukuu.org.uk>55+66+ ICS WDT501-P77+ ICS WDT501-P (no fan tachometer)88+ ICS WDT500-P99+1010+All the interfaces provide /dev/watchdog, which when open must be written1111+to within a timeout or the machine will reboot. Each write delays the reboot1212+time another timeout. In the case of the software watchdog the ability to1313+reboot will depend on the state of the machines and interrupts. The hardware1414+boards physically pull the machine down off their own onboard timers and1515+will reboot from almost anything.1616+1717+A second temperature monitoring interface is available on the WDT501P cards1818+This provides /dev/temperature. This is the machine internal temperature in1919+degrees Fahrenheit. Each read returns a single byte giving the temperature.2020+2121+The third interface logs kernel messages on additional alert events.2222+2323+The wdt card cannot be safely probed for. Instead you need to pass2424+wdt=ioaddr,irq as a boot parameter - eg "wdt=0x240,11".2525+2626+Features2727+--------2828+ WDT501P WDT500P2929+Reboot Timer X X3030+External Reboot X X3131+I/O Port Monitor o o3232+Temperature X o3333+Fan Speed X o3434+Power Under X o3535+Power Over X o3636+Overheat X o3737+3838+The external event interfaces on the WDT boards are not currently supported.3939+Minor numbers are however allocated for it.4040+4141+4242+Example Watchdog Driver: see Documentation/watchdog/src/watchdog-simple.c4343+
+7
drivers/char/watchdog/Kconfig
···115115116116 Say N if you are unsure.117117118118+config KS8695_WATCHDOG119119+ tristate "KS8695 watchdog"120120+ depends on ARCH_KS8695121121+ help122122+ Watchdog timer embedded into KS8695 processor. This will reboot your123123+ system when the timeout is reached.124124+118125config S3C2410_WATCHDOG119126 tristate "S3C2410 Watchdog"120127 depends on ARCH_S3C2410