blob: 41761e167327e31042b77d5f602e33a4502f1424 [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
Pratik Patel43e47bd2012-05-19 18:10:55 -070013#ifndef _LINUX_CS_H
14#define _LINUX_CS_H
15
16/* Peripheral id registers (0xFD0-0xFEC) */
17#define CS_PIDR4 (0xFD0)
18#define CS_PIDR5 (0xFD4)
19#define CS_PIDR6 (0xFD8)
20#define CS_PIDR7 (0xFDC)
21#define CS_PIDR0 (0xFE0)
22#define CS_PIDR1 (0xFE4)
23#define CS_PIDR2 (0xFE8)
24#define CS_PIDR3 (0xFEC)
25/* Component id registers (0xFF0-0xFFC) */
26#define CS_CIDR0 (0xFF0)
27#define CS_CIDR1 (0xFF4)
28#define CS_CIDR2 (0xFF8)
29#define CS_CIDR3 (0xFFC)
30
31/* DBGv7 with baseline CP14 registers implemented */
32#define ARM_DEBUG_ARCH_V7B (0x3)
33/* DBGv7 with all CP14 registers implemented */
34#define ARM_DEBUG_ARCH_V7 (0x4)
35#define ARM_DEBUG_ARCH_V7_1 (0x5)
36#define ETM_ARCH_V3_3 (0x23)
37#define PFT_ARCH_V1_1 (0x31)
Pratik Patelc35426a2012-03-17 12:02:53 -070038
Pratik Patel1403f2a2012-03-21 10:10:00 -070039struct qdss_source {
40 struct list_head link;
41 const char *name;
42 uint32_t fport_mask;
43};
44
45struct msm_qdss_platform_data {
46 struct qdss_source *src_table;
47 size_t size;
48 uint8_t afamily;
49};
50
Pratik Patelbf3e77442012-03-18 18:30:43 -070051#ifdef CONFIG_MSM_QDSS
Pratik Patel1403f2a2012-03-21 10:10:00 -070052extern struct qdss_source *qdss_get(const char *name);
53extern void qdss_put(struct qdss_source *src);
54extern int qdss_enable(struct qdss_source *src);
55extern void qdss_disable(struct qdss_source *src);
Pratik Patelf3adf032012-05-03 12:50:21 -070056extern void qdss_disable_sink(void);
Pratik Patelbf3e77442012-03-18 18:30:43 -070057extern int qdss_clk_enable(void);
58extern void qdss_clk_disable(void);
59#else
Pratik Patel1403f2a2012-03-21 10:10:00 -070060static inline struct qdss_source *qdss_get(const char *name) { return NULL; }
61static inline void qdss_put(struct qdss_source *src) {}
62static inline int qdss_enable(struct qdss_source *src) { return -ENOSYS; }
63static inline void qdss_disable(struct qdss_source *src) {}
Pratik Patelf3adf032012-05-03 12:50:21 -070064static inline void qdss_disable_sink(void) {}
Pratik Patelbf3e77442012-03-18 18:30:43 -070065static inline int qdss_clk_enable(void) { return -ENOSYS; }
66static inline void qdss_clk_disable(void) {}
67#endif
68
Pratik Patel606fb502012-03-17 22:11:03 -070069#ifdef CONFIG_MSM_JTAG
70extern void msm_jtag_save_state(void);
71extern void msm_jtag_restore_state(void);
72#else
73static inline void msm_jtag_save_state(void) {}
74static inline void msm_jtag_restore_state(void) {}
75#endif
76
Pratik Patelc35426a2012-03-17 12:02:53 -070077#endif