aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2013-03-21 12:00:09 +0000
committerJon Medhurst <tixy@linaro.org>2013-05-03 13:50:09 +0100
commit42ef096d399170367f55a37c126c67eb846c381b (patch)
tree6eccc2c28dcaa1a6bb0c43904a7aef0dc8c6d414
parent338f41e8b36bc29c862af83a0be30d6944ed6929 (diff)
ARM: vexpress: Get tc2_pm_psci.c to use common CP15 accessor functions
Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r--arch/arm/mach-vexpress/tc2_pm_psci.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/arch/arm/mach-vexpress/tc2_pm_psci.c b/arch/arm/mach-vexpress/tc2_pm_psci.c
index 04d83d2965f..5a5e4f56849 100644
--- a/arch/arm/mach-vexpress/tc2_pm_psci.c
+++ b/arch/arm/mach-vexpress/tc2_pm_psci.c
@@ -23,6 +23,7 @@
#include <asm/psci.h>
#include <asm/atomic.h>
#include <asm/cputype.h>
+#include <asm/cp15.h>
#include <mach/motherboard.h>
#include <mach/tc2.h>
@@ -83,24 +84,12 @@ static void tc2_pm_psci_power_down(void)
* Overtaken by a power up. Flush caches, exit coherency,
* return & fake a reset
*/
- asm volatile (
- "mrc p15, 0, ip, c1, c0, 0 \n\t"
- "bic ip, ip, #(1 << 2) @ clear C bit \n\t"
- "mcr p15, 0, ip, c1, c0, 0 \n\t"
- "dsb \n\t"
- "isb"
- : : : "ip" );
+ set_cr(get_cr() & ~CR_C);
flush_cache_louis();
- asm volatile (
- "clrex \n\t"
- "mrc p15, 0, ip, c1, c0, 1 \n\t"
- "bic ip, ip, #(1 << 6) @ clear SMP bit \n\t"
- "mcr p15, 0, ip, c1, c0, 1 \n\t"
- "isb \n\t"
- "dsb"
- : : : "ip" );
+ asm volatile ("clrex");
+ set_auxcr(get_auxcr() & ~(1 << 6));
return;
case 0: