]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: mvebu: Move SCU power up in a function
authorGregory CLEMENT <gregory.clement@free-electrons.com>
Thu, 30 Oct 2014 11:39:42 +0000 (12:39 +0100)
committerJason Cooper <jason@lakedaemon.net>
Sat, 22 Nov 2014 02:14:08 +0000 (02:14 +0000)
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>
arch/arm/mach-mvebu/pmsu_ll.S

index a945756cfb45865d6fd0f9bd5927b6c6729e984d..83d014698314a36827574e8256021e7fa2eed51f 100644 (file)
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 
+
+ENTRY(armada_38x_scu_power_up)
+       mrc     p15, 4, r1, c15, c0     @ get SCU base address
+       orr     r1, r1, #0x8            @ SCU CPU Power Status Register
+       mrc     15, 0, r0, cr0, cr0, 5  @ get the CPU ID
+       and     r0, r0, #15
+       add     r1, r1, r0
+       mov     r0, #0x0
+       strb    r0, [r1]                @ switch SCU power state to Normal mode
+       ret     lr
+ENDPROC(armada_38x_scu_power_up)
+
 /*
  * This is the entry point through which CPUs exiting cpuidle deep
  * idle state are going.
@@ -27,13 +39,7 @@ ENTRY(armada_38x_cpu_resume)
        /* do we need it for Armada 38x*/
 ARM_BE8(setend be )                    @ go BE8 if entered LE
        bl      v7_invalidate_l1
-       mrc     p15, 4, r1, c15, c0     @ get SCU base address
-       orr     r1, r1, #0x8            @ SCU CPU Power Status Register
-       mrc     15, 0, r0, cr0, cr0, 5  @ get the CPU ID
-       and     r0, r0, #15
-       add     r1, r1, r0
-       mov     r0, #0x0
-       strb    r0, [r1]                @ switch SCU power state to Normal mode
+       bl      armada_38x_scu_power_up
        b       cpu_resume
 ENDPROC(armada_38x_cpu_resume)