OSDN Git Service

mm: vmalloc: show number of vmalloc pages in /proc/meminfo
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / include / linux / coresight-cti.h
1 /* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
2  *
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 _LINUX_CORESIGHT_CTI_H
14 #define _LINUX_CORESIGHT_CTI_H
15
16 #include <linux/list.h>
17
18 struct coresight_cti_data {
19         int nr_ctis;
20         const char **names;
21 };
22
23 struct coresight_cti {
24         const char *name;
25         struct list_head link;
26 };
27
28 #ifdef CONFIG_CORESIGHT_CTI
29 extern struct coresight_cti *coresight_cti_get(const char *name);
30 extern void coresight_cti_put(struct coresight_cti *cti);
31 extern int coresight_cti_map_trigin(
32                         struct coresight_cti *cti, int trig, int ch);
33 extern int coresight_cti_map_trigout(
34                         struct coresight_cti *cti, int trig, int ch);
35 extern void coresight_cti_unmap_trigin(
36                         struct coresight_cti *cti, int trig, int ch);
37 extern void coresight_cti_unmap_trigout(
38                         struct coresight_cti *cti, int trig, int ch);
39 extern void coresight_cti_reset(struct coresight_cti *cti);
40 extern int coresight_cti_set_trig(struct coresight_cti *cti, int ch);
41 extern void coresight_cti_clear_trig(struct coresight_cti *cti, int ch);
42 extern int coresight_cti_pulse_trig(struct coresight_cti *cti, int ch);
43 extern int coresight_cti_enable_gate(struct coresight_cti *cti, int ch);
44 extern void coresight_cti_disable_gate(struct coresight_cti *cti, int ch);
45 extern void coresight_cti_ctx_save(void);
46 extern void coresight_cti_ctx_restore(void);
47 extern int coresight_cti_ack_trig(struct coresight_cti *cti, int trig);
48 #else
49 static inline struct coresight_cti *coresight_cti_get(const char *name)
50 {
51         return NULL;
52 }
53 static inline void coresight_cti_put(struct coresight_cti *cti) {}
54 static inline int coresight_cti_map_trigin(
55                         struct coresight_cti *cti, int trig, int ch)
56 {
57         return -ENOSYS;
58 }
59 static inline int coresight_cti_map_trigout(
60                         struct coresight_cti *cti, int trig, int ch)
61 {
62         return -ENOSYS;
63 }
64 static inline void coresight_cti_unmap_trigin(
65                         struct coresight_cti *cti, int trig, int ch) {}
66 static inline void coresight_cti_unmap_trigout(
67                         struct coresight_cti *cti, int trig, int ch) {}
68 static inline void coresight_cti_reset(struct coresight_cti *cti) {}
69 static inline int coresight_cti_set_trig(struct coresight_cti *cti, int ch)
70 {
71         return -ENOSYS;
72 }
73 static inline void coresight_cti_clear_trig(struct coresight_cti *cti, int ch)
74 {}
75 static inline int coresight_cti_pulse_trig(struct coresight_cti *cti, int ch)
76 {
77         return -ENOSYS;
78 }
79 static inline int coresight_cti_enable_gate(struct coresight_cti *cti, int ch)
80 {
81         return -ENOSYS;
82 }
83 static inline void coresight_cti_disable_gate(struct coresight_cti *cti, int ch)
84 {}
85 static inline void coresight_cti_ctx_save(void){}
86 static inline void coresight_cti_ctx_restore(void){}
87 static inline int coresight_cti_ack_trig(struct coresight_cti *cti, int trig)
88 {
89         return -ENOSYS;
90 }
91 #endif
92
93 #endif