aboutsummaryrefslogtreecommitdiff
path: root/include/linux/htc_debug_tools.h
blob: 83b03f6a7277e38cbe29180f660a7fc4a84230d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* Copyright (c) 2013, HTC Corporation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
#ifndef __HTC_DEBUG_TOOLS_H__
#define __HTC_DEBUG_TOOLS_H__

#include <linux/types.h>


#if defined(CONFIG_HTC_DEBUG_WATCHDOG)
/* exported from arch/arm/mach-msm/msm_watchdog_v2.c */
int htc_debug_watchdog_enabled(void);

void htc_debug_watchdog_check_pet(unsigned long long timestamp);
void htc_debug_watchdog_update_last_pet(unsigned long long last_pet);
void htc_debug_watchdog_dump_irqs(unsigned int dump);
#endif /* CONFIG_HTC_DEBUG_WATCHDOG */

#if defined(CONFIG_HTC_DEBUG_WORKQUEUE)
/* exported from kernel/workqueue.c */
void workqueue_show_pending_work(void);
#endif /* CONFIG_HTC_DEBUG_WORKQUEUE */

/* n.b.:
 * 1. sched_clock is not irq safe
 * 2. 32 bit: overflows every 4,294,967,296 msecs
 */
unsigned long htc_debug_get_sched_clock_ms(void);
#if defined(CONFIG_HTC_DEBUG_HBRAMLOG)
ssize_t bldr_log_read(const void *lastk_buf, ssize_t lastk_size, char __user *userbuf,
		size_t count, loff_t *ppos);
int bldr_log_init(void);
void bldr_log_release(void);
#endif

#endif /* __HTC_DEBUG_TOOLS_H__ */