msm: jtag: move jtag related definitions to new jtag header
Create new jtag header file and move jtag related definitions to
it. This will decouple jtag code and help make coresight code
generic.
Change-Id: I722de9945800a4d0ba5b792c1b6dda5fc0b3cc40
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c
index d5eb13b..b4dc058 100644
--- a/arch/arm/mach-msm/hotplug.c
+++ b/arch/arm/mach-msm/hotplug.c
@@ -17,6 +17,7 @@
#include <asm/smp_plat.h>
#include <asm/vfp.h>
+#include <mach/jtag.h>
#include <mach/msm_rtb.h>
#include "pm.h"
diff --git a/arch/arm/mach-msm/include/mach/jtag.h b/arch/arm/mach-msm/include/mach/jtag.h
new file mode 100644
index 0000000..3850eff
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/jtag.h
@@ -0,0 +1,24 @@
+/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __MACH_JTAG_H
+#define __MACH_JTAG_H
+
+#ifdef CONFIG_MSM_JTAG
+extern void msm_jtag_save_state(void);
+extern void msm_jtag_restore_state(void);
+#else
+static inline void msm_jtag_save_state(void) {}
+static inline void msm_jtag_restore_state(void) {}
+#endif
+
+#endif
diff --git a/arch/arm/mach-msm/jtag.c b/arch/arm/mach-msm/jtag.c
index cd4a908..c6e013c 100644
--- a/arch/arm/mach-msm/jtag.c
+++ b/arch/arm/mach-msm/jtag.c
@@ -19,18 +19,12 @@
#include <linux/export.h>
#include <linux/printk.h>
#include <linux/ratelimit.h>
+#include <linux/cs.h>
#include <mach/scm.h>
+#include <mach/jtag.h>
#include "cp14.h"
-/* DBGv7 with baseline CP14 registers implemented */
-#define ARM_DEBUG_ARCH_V7B (0x3)
-/* DBGv7 with all CP14 registers implemented */
-#define ARM_DEBUG_ARCH_V7 (0x4)
-#define ARM_DEBUG_ARCH_V7_1 (0x5)
-#define ETM_ARCH_V3_3 (0x23)
-#define PFT_ARCH_V1_1 (0x31)
-
#define BM(lsb, msb) ((BIT(msb) - BIT(lsb)) + BIT(msb))
#define BMVAL(val, lsb, msb) ((val & BM(lsb, msb)) >> lsb)
#define BVAL(val, n) ((val & BIT(n)) >> n)
diff --git a/include/linux/cs.h b/include/linux/cs.h
index 41761e1..5fe8fc6 100644
--- a/include/linux/cs.h
+++ b/include/linux/cs.h
@@ -66,12 +66,4 @@
static inline void qdss_clk_disable(void) {}
#endif
-#ifdef CONFIG_MSM_JTAG
-extern void msm_jtag_save_state(void);
-extern void msm_jtag_restore_state(void);
-#else
-static inline void msm_jtag_save_state(void) {}
-static inline void msm_jtag_restore_state(void) {}
-#endif
-
#endif