blob: 05d85770fe9153449ad7715112c87effa6a9e3f6 [file] [log] [blame]
Pratik Patelc35426a2012-03-17 12:02:53 -07001/* 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 Patel1403f2a2012-03-21 10:10:00 -070016struct qdss_source {
17 struct list_head link;
18 const char *name;
19 uint32_t fport_mask;
20};
21
22struct msm_qdss_platform_data {
23 struct qdss_source *src_table;
24 size_t size;
25 uint8_t afamily;
26};
27
Pratik Patelbf3e77442012-03-18 18:30:43 -070028#ifdef CONFIG_MSM_QDSS
Pratik Patel1403f2a2012-03-21 10:10:00 -070029extern struct qdss_source *qdss_get(const char *name);
30extern void qdss_put(struct qdss_source *src);
31extern int qdss_enable(struct qdss_source *src);
32extern void qdss_disable(struct qdss_source *src);
Pratik Patelf3adf032012-05-03 12:50:21 -070033extern void qdss_disable_sink(void);
Pratik Patelbf3e77442012-03-18 18:30:43 -070034extern int qdss_clk_enable(void);
35extern void qdss_clk_disable(void);
36#else
Pratik Patel1403f2a2012-03-21 10:10:00 -070037static inline struct qdss_source *qdss_get(const char *name) { return NULL; }
38static inline void qdss_put(struct qdss_source *src) {}
39static inline int qdss_enable(struct qdss_source *src) { return -ENOSYS; }
40static inline void qdss_disable(struct qdss_source *src) {}
Pratik Patelf3adf032012-05-03 12:50:21 -070041static inline void qdss_disable_sink(void) {}
Pratik Patelbf3e77442012-03-18 18:30:43 -070042static inline int qdss_clk_enable(void) { return -ENOSYS; }
43static inline void qdss_clk_disable(void) {}
44#endif
45
Pratik Patel606fb502012-03-17 22:11:03 -070046#ifdef CONFIG_MSM_JTAG
47extern void msm_jtag_save_state(void);
48extern void msm_jtag_restore_state(void);
49#else
50static inline void msm_jtag_save_state(void) {}
51static inline void msm_jtag_restore_state(void) {}
52#endif
53
Pratik Patelc35426a2012-03-17 12:02:53 -070054#endif