blob: c3dce9f3732d9f25d28a1acdf87578c28aec970f [file] [log] [blame]
Pratik Pateld944cc72013-02-08 11:52:12 -08001/* Copyright (c) 2013, 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
16struct coresight_cti_data {
17 int nr_ctis;
18 const char **names;
19};
20
21struct coresight_cti {
22 const char *name;
23 struct list_head link;
24};
25
26#ifdef CONFIG_CORESIGHT_CTI
27extern struct coresight_cti *coresight_cti_get(const char *name);
28extern void coresight_cti_put(struct coresight_cti *cti);
29extern int coresight_cti_map_trigin(
30 struct coresight_cti *cti, int trig, int ch);
31extern int coresight_cti_map_trigout(
32 struct coresight_cti *cti, int trig, int ch);
33extern void coresight_cti_unmap_trigin(
34 struct coresight_cti *cti, int trig, int ch);
35extern void coresight_cti_unmap_trigout(
36 struct coresight_cti *cti, int trig, int ch);
Aparna Das156a2952013-07-24 16:46:48 -070037extern void coresight_cti_reset(struct coresight_cti *cti);
Pratik Pateld944cc72013-02-08 11:52:12 -080038#else
39static inline struct coresight_cti *coresight_cti_get(const char *name)
40{
41 return NULL;
42}
43static inline void coresight_cti_put(struct coresight_cti *cti) {}
44static inline int coresight_cti_map_trigin(
45 struct coresight_cti *cti, int trig, int ch)
46{
47 return -ENOSYS;
48}
49static inline int coresight_cti_map_trigout(
50 struct coresight_cti *cti, int trig, int ch)
51{
52 return -ENOSYS;
53}
54static inline void coresight_cti_unmap_trigin(
55 struct coresight_cti *cti, int trig, int ch) {}
56static inline void coresight_cti_unmap_trigout(
57 struct coresight_cti *cti, int trig, int ch) {}
Aparna Das156a2952013-07-24 16:46:48 -070058static inline void coresight_cti_reset(struct coresight_cti *cti) {}
Pratik Pateld944cc72013-02-08 11:52:12 -080059#endif
60
61#endif