1
2
3
4
5
6
7
8
9
10#ifndef __OMAP_WDT_H__
11#define __OMAP_WDT_H__
12
13#ifndef __ASSEMBLY__
14#include <linux/bitops.h>
15#endif
16
17
18
19
20
21
22
23#define TIMER_MARGIN_MAX (24 * 60 * 60)
24#define TIMER_MARGIN_DEFAULT 60
25#define TIMER_MARGIN_MIN 1
26
27#define PTV 0
28#define GET_WLDR_VAL(secs) (0xffffffff - ((secs) * (32768/(1<<PTV))) + 1)
29#define WDT_WWPS_PEND_WCLR BIT(0)
30#define WDT_WWPS_PEND_WLDR BIT(2)
31#define WDT_WWPS_PEND_WTGR BIT(3)
32#define WDT_WWPS_PEND_WSPR BIT(4)
33
34#define WDT_WCLR_PRE BIT(5)
35#define WDT_WCLR_PTV_OFF 2
36
37
38struct wd_timer {
39 unsigned int resv1[4];
40 unsigned int wdtwdsc;
41 unsigned int wdtwdst;
42 unsigned int wdtwisr;
43 unsigned int wdtwier;
44 unsigned int wdtwwer;
45 unsigned int wdtwclr;
46 unsigned int wdtwcrr;
47 unsigned int wdtwldr;
48 unsigned int wdtwtgr;
49 unsigned int wdtwwps;
50 unsigned int resv2[3];
51 unsigned int wdtwdly;
52 unsigned int wdtwspr;
53 unsigned int resv3[1];
54 unsigned int wdtwqeoi;
55 unsigned int wdtwqstar;
56 unsigned int wdtwqsta;
57 unsigned int wdtwqens;
58 unsigned int wdtwqenc;
59 unsigned int resv4[39];
60 unsigned int wdt_unfr;
61};
62
63struct omap3_wdt_priv {
64 struct wd_timer *regs;
65 unsigned int wdt_trgr_pattern;
66};
67
68#endif
69