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