msm: krait-l2-accessors: Remove set_get_l2_indirect_reg() API

There are no remaining users of this API, which writes to an indirect
register and reads back the new value. To simplify the future addition
of RTB logging for L2 indirect CP15 accesses, remove the unused API.

set_l2_indirect_reg() and get_l2_indirect_reg() can be individually
called to accomplish the same purpose that set_get_l2_indirect_reg()
served, with a negligible performance difference for common usecases.

Change-Id: If372370eabda7cf5d9eee488222a17e139609a36
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
diff --git a/arch/arm/mach-msm/include/mach/msm-krait-l2-accessors.h b/arch/arm/mach-msm/include/mach/msm-krait-l2-accessors.h
index 45d000b..5e927cf 100644
--- a/arch/arm/mach-msm/include/mach/msm-krait-l2-accessors.h
+++ b/arch/arm/mach-msm/include/mach/msm-krait-l2-accessors.h
@@ -1,8 +1,5 @@
-#ifndef __ASM_ARCH_MSM_MSM_KRAIT_L2_ACCESSORS_H
-#define __ASM_ARCH_MSM_MSM_KRAIT_L2_ACCESSORS_H
-
 /*
- * Copyright (c) 2011-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2014 The Linux Foundation. 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
@@ -14,6 +11,9 @@
  * GNU General Public License for more details.
  */
 
+#ifndef __ASM_ARCH_MSM_MSM_KRAIT_L2_ACCESSORS_H
+#define __ASM_ARCH_MSM_MSM_KRAIT_L2_ACCESSORS_H
+
 #define MAX_L2_PERIOD		((1ULL << 32) - 1)
 #define MAX_KRAIT_L2_CTRS	10
 
@@ -66,17 +66,12 @@
 #ifdef CONFIG_ARCH_MSM_KRAIT
 extern void set_l2_indirect_reg(u32 reg_addr, u32 val);
 extern u32 get_l2_indirect_reg(u32 reg_addr);
-extern u32 set_get_l2_indirect_reg(u32 reg_addr, u32 val);
 #else
 static inline void set_l2_indirect_reg(u32 reg_addr, u32 val) {}
 static inline u32 get_l2_indirect_reg(u32 reg_addr)
 {
 	return 0;
 }
-static inline u32 set_get_l2_indirect_reg(u32 reg_addr, u32 val)
-{
-	return 0;
-}
 #endif
 
 #endif
diff --git a/arch/arm/mach-msm/msm-krait-l2-accessors.c b/arch/arm/mach-msm/msm-krait-l2-accessors.c
index 7498e7f..fd8b68b 100644
--- a/arch/arm/mach-msm/msm-krait-l2-accessors.c
+++ b/arch/arm/mach-msm/msm-krait-l2-accessors.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2012, 2014, The Linux Foundation. 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
@@ -18,27 +18,6 @@
 
 DEFINE_RAW_SPINLOCK(l2_access_lock);
 
-u32 set_get_l2_indirect_reg(u32 reg_addr, u32 val)
-{
-	unsigned long flags;
-	u32 ret_val;
-
-	raw_spin_lock_irqsave(&l2_access_lock, flags);
-	mb();
-	asm volatile ("mcr     p15, 3, %[l2cpselr], c15, c0, 6\n\t"
-		      "isb\n\t"
-		      "mcr     p15, 3, %[l2cpdr],   c15, c0, 7\n\t"
-		      "isb\n\t"
-		      "mrc p15, 3, %[l2cpdr_read], c15, c0, 7\n\t"
-			: [l2cpdr_read]"=r" (ret_val)
-			: [l2cpselr]"r" (reg_addr), [l2cpdr]"r" (val)
-	);
-	raw_spin_unlock_irqrestore(&l2_access_lock, flags);
-
-	return ret_val;
-}
-EXPORT_SYMBOL(set_get_l2_indirect_reg);
-
 void set_l2_indirect_reg(u32 reg_addr, u32 val)
 {
 	unsigned long flags;