MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / drivers / char / moxaart_moxa_swtd.h
blob6827606b3f9b6b9ae202090153bd7d89063b96b1
1 #ifndef __MOXAART_MOXA_SWDT__
2 #define __MOXAART_MOXA_SWDT__
4 #define DEFAULT_WATCHDOG_TIME (30UL*1000UL) // 30 seconds
5 #define WATCHDOG_MIN_TIME 50UL // 50 msec
6 #define WATCHDOG_MAX_TIME (60UL*1000UL) // 60 seconds
7 #define WATCHDOG_TOL_TIME (50UL) // 50 msec, for watchdog timer polling
8 #define WATCHDOG_DEFER_TIME (15000UL) // 5 sec, for hw watchdog timer rebooting
10 #define WATCHDOG_COUNTER(x) ((APB_CLK/1000UL)*(x))
11 #define WATCHDOG_ACK_JIFFIES(x) (((x)*HZ/1000UL)-WATCHDOG_TOL_TIME)
13 #define MOXA_WATCHDOG_MINOR 106
14 #define IOCTL_WATCHDOG_ENABLE 1 // enable watch dog and set time (unint msec)
15 #define IOCTL_WATCHDOG_DISABLE 2 // disable watch dog, kernle do it
16 #define IOCTL_WATCHDOG_GET_SETTING 3 // get now setting about mode and time
17 #define IOCTL_WATCHDOG_ACK 4 // to ack watch dog
19 struct swtd_set_struct {
20 int mode;
21 unsigned long time;
24 #endif //___MOXAART_MOXA_SWDT__