Pratik Patel | d944cc7 | 2013-02-08 11:52:12 -0800 | [diff] [blame] | 1 | /* 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 | |
| 16 | struct coresight_cti_data { |
| 17 | int nr_ctis; |
| 18 | const char **names; |
| 19 | }; |
| 20 | |
| 21 | struct coresight_cti { |
| 22 | const char *name; |
| 23 | struct list_head link; |
| 24 | }; |
| 25 | |
| 26 | #ifdef CONFIG_CORESIGHT_CTI |
| 27 | extern struct coresight_cti *coresight_cti_get(const char *name); |
| 28 | extern void coresight_cti_put(struct coresight_cti *cti); |
| 29 | extern int coresight_cti_map_trigin( |
| 30 | struct coresight_cti *cti, int trig, int ch); |
| 31 | extern int coresight_cti_map_trigout( |
| 32 | struct coresight_cti *cti, int trig, int ch); |
| 33 | extern void coresight_cti_unmap_trigin( |
| 34 | struct coresight_cti *cti, int trig, int ch); |
| 35 | extern void coresight_cti_unmap_trigout( |
| 36 | struct coresight_cti *cti, int trig, int ch); |
Aparna Das | 156a295 | 2013-07-24 16:46:48 -0700 | [diff] [blame] | 37 | extern void coresight_cti_reset(struct coresight_cti *cti); |
Pratik Patel | d944cc7 | 2013-02-08 11:52:12 -0800 | [diff] [blame] | 38 | #else |
| 39 | static inline struct coresight_cti *coresight_cti_get(const char *name) |
| 40 | { |
| 41 | return NULL; |
| 42 | } |
| 43 | static inline void coresight_cti_put(struct coresight_cti *cti) {} |
| 44 | static inline int coresight_cti_map_trigin( |
| 45 | struct coresight_cti *cti, int trig, int ch) |
| 46 | { |
| 47 | return -ENOSYS; |
| 48 | } |
| 49 | static inline int coresight_cti_map_trigout( |
| 50 | struct coresight_cti *cti, int trig, int ch) |
| 51 | { |
| 52 | return -ENOSYS; |
| 53 | } |
| 54 | static inline void coresight_cti_unmap_trigin( |
| 55 | struct coresight_cti *cti, int trig, int ch) {} |
| 56 | static inline void coresight_cti_unmap_trigout( |
| 57 | struct coresight_cti *cti, int trig, int ch) {} |
Aparna Das | 156a295 | 2013-07-24 16:46:48 -0700 | [diff] [blame] | 58 | static inline void coresight_cti_reset(struct coresight_cti *cti) {} |
Pratik Patel | d944cc7 | 2013-02-08 11:52:12 -0800 | [diff] [blame] | 59 | #endif |
| 60 | |
| 61 | #endif |