1*4882a593Smuzhiyun=================================== 2*4882a593SmuzhiyunBerkshire Products PC Watchdog Card 3*4882a593Smuzhiyun=================================== 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunLast reviewed: 10/05/2007 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunSupport for ISA Cards Revision A and C 8*4882a593Smuzhiyun======================================= 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunDocumentation and Driver by Ken Hollis <kenji@bitgate.com> 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun The PC Watchdog is a card that offers the same type of functionality that 13*4882a593Smuzhiyun the WDT card does, only it doesn't require an IRQ to run. Furthermore, 14*4882a593Smuzhiyun the Revision C card allows you to monitor any IO Port to automatically 15*4882a593Smuzhiyun trigger the card into being reset. This way you can make the card 16*4882a593Smuzhiyun monitor hard drive status, or anything else you need. 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun The Watchdog Driver has one basic role: to talk to the card and send 19*4882a593Smuzhiyun signals to it so it doesn't reset your computer ... at least during 20*4882a593Smuzhiyun normal operation. 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun The Watchdog Driver will automatically find your watchdog card, and will 23*4882a593Smuzhiyun attach a running driver for use with that card. After the watchdog 24*4882a593Smuzhiyun drivers have initialized, you can then talk to the card using a PC 25*4882a593Smuzhiyun Watchdog program. 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun I suggest putting a "watchdog -d" before the beginning of an fsck, and 28*4882a593Smuzhiyun a "watchdog -e -t 1" immediately after the end of an fsck. (Remember 29*4882a593Smuzhiyun to run the program with an "&" to run it in the background!) 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun If you want to write a program to be compatible with the PC Watchdog 32*4882a593Smuzhiyun driver, simply use of modify the watchdog test program: 33*4882a593Smuzhiyun tools/testing/selftests/watchdog/watchdog-test.c 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun Other IOCTL functions include: 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun WDIOC_GETSUPPORT 39*4882a593Smuzhiyun This returns the support of the card itself. This 40*4882a593Smuzhiyun returns in structure "PCWDS" which returns: 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun options = WDIOS_TEMPPANIC 43*4882a593Smuzhiyun (This card supports temperature) 44*4882a593Smuzhiyun firmware_version = xxxx 45*4882a593Smuzhiyun (Firmware version of the card) 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun WDIOC_GETSTATUS 48*4882a593Smuzhiyun This returns the status of the card, with the bits of 49*4882a593Smuzhiyun WDIOF_* bitwise-anded into the value. (The comments 50*4882a593Smuzhiyun are in linux/pcwd.h) 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun WDIOC_GETBOOTSTATUS 53*4882a593Smuzhiyun This returns the status of the card that was reported 54*4882a593Smuzhiyun at bootup. 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun WDIOC_GETTEMP 57*4882a593Smuzhiyun This returns the temperature of the card. (You can also 58*4882a593Smuzhiyun read /dev/watchdog, which gives a temperature update 59*4882a593Smuzhiyun every second.) 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun WDIOC_SETOPTIONS 62*4882a593Smuzhiyun This lets you set the options of the card. You can either 63*4882a593Smuzhiyun enable or disable the card this way. 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun WDIOC_KEEPALIVE 66*4882a593Smuzhiyun This pings the card to tell it not to reset your computer. 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun And that's all she wrote! 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun -- Ken Hollis 71*4882a593Smuzhiyun (kenji@bitgate.com) 72