Pratik Patel | c35426a | 2012-03-17 12:02:53 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2012, Code Aurora Forum. 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 __MACH_QDSS_H |
| 14 | #define __MACH_QDSS_H |
| 15 | |
Pratik Patel | 1403f2a | 2012-03-21 10:10:00 -0700 | [diff] [blame] | 16 | struct qdss_source { |
| 17 | struct list_head link; |
| 18 | const char *name; |
| 19 | uint32_t fport_mask; |
| 20 | }; |
| 21 | |
| 22 | struct msm_qdss_platform_data { |
| 23 | struct qdss_source *src_table; |
| 24 | size_t size; |
| 25 | uint8_t afamily; |
| 26 | }; |
| 27 | |
Pratik Patel | bf3e7744 | 2012-03-18 18:30:43 -0700 | [diff] [blame] | 28 | #ifdef CONFIG_MSM_QDSS |
Pratik Patel | 1403f2a | 2012-03-21 10:10:00 -0700 | [diff] [blame] | 29 | extern struct qdss_source *qdss_get(const char *name); |
| 30 | extern void qdss_put(struct qdss_source *src); |
| 31 | extern int qdss_enable(struct qdss_source *src); |
| 32 | extern void qdss_disable(struct qdss_source *src); |
Pratik Patel | f3adf03 | 2012-05-03 12:50:21 -0700 | [diff] [blame] | 33 | extern void qdss_disable_sink(void); |
Pratik Patel | bf3e7744 | 2012-03-18 18:30:43 -0700 | [diff] [blame] | 34 | extern int qdss_clk_enable(void); |
| 35 | extern void qdss_clk_disable(void); |
| 36 | #else |
Pratik Patel | 1403f2a | 2012-03-21 10:10:00 -0700 | [diff] [blame] | 37 | static inline struct qdss_source *qdss_get(const char *name) { return NULL; } |
| 38 | static inline void qdss_put(struct qdss_source *src) {} |
| 39 | static inline int qdss_enable(struct qdss_source *src) { return -ENOSYS; } |
| 40 | static inline void qdss_disable(struct qdss_source *src) {} |
Pratik Patel | f3adf03 | 2012-05-03 12:50:21 -0700 | [diff] [blame] | 41 | static inline void qdss_disable_sink(void) {} |
Pratik Patel | bf3e7744 | 2012-03-18 18:30:43 -0700 | [diff] [blame] | 42 | static inline int qdss_clk_enable(void) { return -ENOSYS; } |
| 43 | static inline void qdss_clk_disable(void) {} |
| 44 | #endif |
| 45 | |
Pratik Patel | 606fb50 | 2012-03-17 22:11:03 -0700 | [diff] [blame] | 46 | #ifdef CONFIG_MSM_JTAG |
| 47 | extern void msm_jtag_save_state(void); |
| 48 | extern void msm_jtag_restore_state(void); |
| 49 | #else |
| 50 | static inline void msm_jtag_save_state(void) {} |
| 51 | static inline void msm_jtag_restore_state(void) {} |
| 52 | #endif |
| 53 | |
Pratik Patel | c35426a | 2012-03-17 12:02:53 -0700 | [diff] [blame] | 54 | #endif |