]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: introduce common set_auxcr/get_auxcr functions
authorRob Herring <rob.herring@calxeda.com>
Wed, 16 Jan 2013 23:57:33 +0000 (17:57 -0600)
committerNicolas Pitre <nicolas.pitre@linaro.org>
Wed, 29 May 2013 19:50:34 +0000 (15:50 -0400)
Move the private set_auxcr/get_auxcr functions from
drivers/cpuidle/cpuidle-calxeda.c so they can be used across platforms.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
arch/arm/include/asm/cp15.h
drivers/cpuidle/cpuidle-calxeda.c

index 1f3262e99d81e6e7be2bf3864b6649d32a39b0da..cedd3721318b2f1a4251717ab383ee865e2aef7c 100644 (file)
@@ -61,6 +61,20 @@ static inline void set_cr(unsigned int val)
        isb();
 }
 
+static inline unsigned int get_auxcr(void)
+{
+       unsigned int val;
+       asm("mrc p15, 0, %0, c1, c0, 1  @ get AUXCR" : "=r" (val));
+       return val;
+}
+
+static inline void set_auxcr(unsigned int val)
+{
+       asm volatile("mcr p15, 0, %0, c1, c0, 1 @ set AUXCR"
+         : : "r" (val));
+       isb();
+}
+
 #ifndef CONFIG_SMP
 extern void adjust_cr(unsigned long mask, unsigned long set);
 #endif
index 223379169cb08d01907906919882da5941cd1843..0e6e408c0a630b71c466f3fabaa7decd1b97fed0 100644 (file)
 extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
 extern void *scu_base_addr;
 
-static inline unsigned int get_auxcr(void)
-{
-       unsigned int val;
-       asm("mrc p15, 0, %0, c1, c0, 1  @ get AUXCR" : "=r" (val) : : "cc");
-       return val;
-}
-
-static inline void set_auxcr(unsigned int val)
-{
-       asm volatile("mcr p15, 0, %0, c1, c0, 1 @ set AUXCR"
-         : : "r" (val) : "cc");
-       isb();
-}
-
 static noinline void calxeda_idle_restore(void)
 {
        set_cr(get_cr() | CR_C);