aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@free-electrons.com>2014-10-30 07:39:42 -0400
committerJason Cooper <jason@lakedaemon.net>2014-11-21 21:14:08 -0500
commitf746ac327b2fe7235a3b94de3d6d4b2be0f8f6a0 (patch)
tree72f299707bbe86fb3e6b912cde890810853bb243
parent316fbbc400875c647c3a220c7525ffa8d2c80306 (diff)
ARM: mvebu: Move SCU power up in a function
This will allow reusing the same function in the secondary_startup for the Cortex A9 SoC. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Link: https://lkml.kernel.org/r/1414669184-16785-3-git-send-email-gregory.clement@free-electrons.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/mach-mvebu/pmsu_ll.S20
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/arm/mach-mvebu/pmsu_ll.S b/arch/arm/mach-mvebu/pmsu_ll.S
index a945756cfb45..83d014698314 100644
--- a/arch/arm/mach-mvebu/pmsu_ll.S
+++ b/arch/arm/mach-mvebu/pmsu_ll.S
@@ -12,6 +12,18 @@
12#include <linux/linkage.h> 12#include <linux/linkage.h>
13#include <asm/assembler.h> 13#include <asm/assembler.h>
14 14
15
16ENTRY(armada_38x_scu_power_up)
17 mrc p15, 4, r1, c15, c0 @ get SCU base address
18 orr r1, r1, #0x8 @ SCU CPU Power Status Register
19 mrc 15, 0, r0, cr0, cr0, 5 @ get the CPU ID
20 and r0, r0, #15
21 add r1, r1, r0
22 mov r0, #0x0
23 strb r0, [r1] @ switch SCU power state to Normal mode
24 ret lr
25ENDPROC(armada_38x_scu_power_up)
26
15/* 27/*
16 * This is the entry point through which CPUs exiting cpuidle deep 28 * This is the entry point through which CPUs exiting cpuidle deep
17 * idle state are going. 29 * idle state are going.
@@ -27,13 +39,7 @@ ENTRY(armada_38x_cpu_resume)
27 /* do we need it for Armada 38x*/ 39 /* do we need it for Armada 38x*/
28ARM_BE8(setend be ) @ go BE8 if entered LE 40ARM_BE8(setend be ) @ go BE8 if entered LE
29 bl v7_invalidate_l1 41 bl v7_invalidate_l1
30 mrc p15, 4, r1, c15, c0 @ get SCU base address 42 bl armada_38x_scu_power_up
31 orr r1, r1, #0x8 @ SCU CPU Power Status Register
32 mrc 15, 0, r0, cr0, cr0, 5 @ get the CPU ID
33 and r0, r0, #15
34 add r1, r1, r0
35 mov r0, #0x0
36 strb r0, [r1] @ switch SCU power state to Normal mode
37 b cpu_resume 43 b cpu_resume
38ENDPROC(armada_38x_cpu_resume) 44ENDPROC(armada_38x_cpu_resume)
39 45