2 * Copyright (C) 2014 Marvell
4 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
5 * Gregory Clement <gregory.clement@free-electrons.com>
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
12 #include <linux/linkage.h>
13 #include <asm/assembler.h>
16 * This is the entry point through which CPUs exiting cpuidle deep
17 * idle state are going.
19 ENTRY(armada_370_xp_cpu_resume)
20 ARM_BE8(setend be ) @ go BE8 if entered LE
21 bl ll_add_cpu_to_smp_group
22 bl ll_enable_coherency
24 ENDPROC(armada_370_xp_cpu_resume)
26 ENTRY(armada_38x_cpu_resume)
27 /* do we need it for Armada 38x*/
28 ARM_BE8(setend be ) @ go BE8 if entered LE
30 mrc p15, 4, r1, c15, c0 @ get SCU base address
31 orr r1, r1, #0x8 @ SCU CPU Power Status Register
32 mrc 15, 0, r0, cr0, cr0, 5 @ get the CPU ID
36 strb r0, [r1] @ switch SCU power state to Normal mode
38 ENDPROC(armada_38x_cpu_resume)
40 .global mvebu_boot_wa_start
41 .global mvebu_boot_wa_end
43 /* The following code will be executed from SRAM */
44 ENTRY(mvebu_boot_wa_start)
48 ldr r0, [r0] @ load the address of the
50 ldr r0, [r0] @ load the value in the
52 ARM_BE8(rev r0, r0) @ the value is stored LE
53 mov pc, r0 @ jump to this value
55 * the last word of this piece of code will be filled by the physical
56 * address of the boot address register just after being copied in SRAM
61 ENDPROC(mvebu_boot_wa_end)