Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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