import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / mach / wd_api.h
1 #ifndef _MT_WD_API_H_
2 #define _MT_WD_API_H_
3 /* WD MODE MARK BIT */
4 #define MTK_WDT_REQ_DEBUG_EN_MARK (0x80000)
5 #define MTK_WDT_REQ_SPM_THERMAL_MARK (0x0001)
6 #define MTK_WDT_REQ_SPM_SCPSYS_MARK (0x0002)
7 #define MTK_WDT_REQ_THERMAL_MARK (1<<18)
8
9 typedef enum ext_wdt_mode {
10 WDT_IRQ_ONLY_MODE,
11 WDT_HW_REBOOT_ONLY_MODE,
12 WDT_DUAL_MODE,
13 } WD_MODE;
14
15 typedef enum wk_wdt_en {
16 WK_WDT_DIS,
17 WK_WDT_EN,
18 } WD_CTL;
19
20
21 typedef enum wd_restart_type {
22 WD_TYPE_NORMAL,
23 WD_TYPE_NOLOCK,
24 } WD_RES_TYPE;
25
26 typedef enum wk_req_en {
27 WD_REQ_DIS,
28 WD_REQ_EN,
29 } WD_REQ_CTL;
30
31 typedef enum wk_req_mode {
32 WD_REQ_IRQ_MODE,
33 WD_REQ_RST_MODE,
34 } WD_REQ_MODE;
35
36 struct wd_api {
37 long ready;
38 int (*wd_restart) (enum wd_restart_type type);
39 int (*wd_cpu_hot_plug_on_notify) (int);
40 int (*wd_cpu_hot_plug_off_notify) (int);
41 int (*wd_sw_reset) (int);
42 int (*wd_config) (enum ext_wdt_mode, int timeout_val);
43 int (*wd_disable_ext) (void);
44 int (*wd_disable_local) (void);
45 int (*wd_disable_all) (void);
46 int (*wd_set_mode) (enum ext_wdt_mode);
47 int (*wd_aee_confirm_hwreboot) (void);
48 void (*wd_suspend_notify) (void);
49 void (*wd_resume_notify) (void);
50 unsigned int (*wd_get_check_bit) (void);
51 unsigned int (*wd_get_kick_bit) (void);
52 int (*wd_spmwdt_mode_config) (WD_REQ_CTL en, WD_REQ_MODE mode);
53 int (*wd_thermal_mode_config) (WD_REQ_CTL en, WD_REQ_MODE mode);
54 int (*wd_dram_reserved_mode) (bool enabled);
55 int (*wd_thermal_direct_mode_config) (WD_REQ_CTL en, WD_REQ_MODE mode);
56 };
57
58 int wd_api_init(void);
59 int get_wd_api(struct wd_api **obj);
60 #endif /* _MT_WD_API_H_ */