blob: 00ff0b61d0b4412f9f48d2bc2520065512dffcf1 [file] [log] [blame]
Rohit Vaswanic9fdd442012-03-19 14:18:32 -07001/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __ARCH_ARM_MACH_MSM_MSM_WATCHDOG_H
14#define __ARCH_ARM_MACH_MSM_MSM_WATCHDOG_H
15
Jeff Ohlstein7e668552011-10-06 16:17:25 -070016struct msm_watchdog_pdata {
17 /* pet interval period in ms */
18 unsigned int pet_time;
19 /* bark timeout in ms */
20 unsigned int bark_time;
21 bool has_secure;
Joel Kinge7ca6f72012-02-09 20:51:25 -080022 bool needs_expired_enable;
Rohit Vaswanic9fdd442012-03-19 14:18:32 -070023 bool has_vic;
Rohit Vaswaniead426f2012-01-05 20:24:52 -080024 /* You have to be running in secure mode to use FIQ */
25 bool use_kernel_fiq;
Jeff Ohlstein7e668552011-10-06 16:17:25 -070026};
27
Rohit Vaswaniead426f2012-01-05 20:24:52 -080028struct msm_watchdog_dump {
29 uint32_t magic;
30 uint32_t curr_cpsr;
31 uint32_t usr_r0;
32 uint32_t usr_r1;
33 uint32_t usr_r2;
34 uint32_t usr_r3;
35 uint32_t usr_r4;
36 uint32_t usr_r5;
37 uint32_t usr_r6;
38 uint32_t usr_r7;
39 uint32_t usr_r8;
40 uint32_t usr_r9;
41 uint32_t usr_r10;
42 uint32_t usr_r11;
43 uint32_t usr_r12;
44 uint32_t usr_r13;
45 uint32_t usr_r14;
46 uint32_t irq_spsr;
47 uint32_t irq_r13;
48 uint32_t irq_r14;
49 uint32_t svc_spsr;
50 uint32_t svc_r13;
51 uint32_t svc_r14;
52 uint32_t abt_spsr;
53 uint32_t abt_r13;
54 uint32_t abt_r14;
55 uint32_t und_spsr;
56 uint32_t und_r13;
57 uint32_t und_r14;
58 uint32_t fiq_spsr;
59 uint32_t fiq_r8;
60 uint32_t fiq_r9;
61 uint32_t fiq_r10;
62 uint32_t fiq_r11;
63 uint32_t fiq_r12;
64 uint32_t fiq_r13;
65 uint32_t fiq_r14;
66};
67
68void msm_wdog_fiq_setup(void *stack);
69extern unsigned int msm_wdog_fiq_length, msm_wdog_fiq_start;
70
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070071#ifdef CONFIG_MSM_WATCHDOG
72void pet_watchdog(void);
73#else
74static inline void pet_watchdog(void) { }
75#endif
76
77#endif