Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[deliverable/linux.git] / arch / arm / mach-imx / headsmp.S
CommitLineData
69c31b7a
SG
1/*
2 * Copyright 2011 Freescale Semiconductor, Inc.
3 * Copyright 2011 Linaro Ltd.
4 *
5 * The code contained herein is licensed under the GNU General Public
6 * License. You may obtain a copy of the GNU General Public License
7 * Version 2 or later at the following locations:
8 *
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
11 */
12
13#include <linux/linkage.h>
14#include <linux/init.h>
a1f1c7ef 15#include <asm/asm-offsets.h>
69c31b7a
SG
16#include <asm/hardware/cache-l2x0.h>
17
18 .section ".text.head", "ax"
69c31b7a 19
69c31b7a
SG
20#ifdef CONFIG_SMP
21ENTRY(v7_secondary_startup)
22 bl v7_invalidate_l1
23 b secondary_startup
24ENDPROC(v7_secondary_startup)
25#endif
a1f1c7ef 26
46ec1b26 27#ifdef CONFIG_PM
a1f1c7ef 28/*
b4e61537
NP
29 * The following code must assume it is running from physical address
30 * where absolute virtual addresses to the data section have to be
31 * turned into relative ones.
a1f1c7ef 32 */
a1f1c7ef 33
733d1724 34#ifdef CONFIG_CACHE_L2X0
a1f1c7ef 35 .macro pl310_resume
b4e61537
NP
36 adr r0, l2x0_saved_regs_offset
37 ldr r2, [r0]
38 add r2, r2, r0
a1f1c7ef
SG
39 ldr r0, [r2, #L2X0_R_PHY_BASE] @ get physical base of l2x0
40 ldr r1, [r2, #L2X0_R_AUX_CTRL] @ get aux_ctrl value
41 str r1, [r0, #L2X0_AUX_CTRL] @ restore aux_ctrl
42 mov r1, #0x1
43 str r1, [r0, #L2X0_CTRL] @ re-enable L2
44 .endm
45
b4e61537
NP
46l2x0_saved_regs_offset:
47 .word l2x0_saved_regs - .
48
733d1724
EM
49#else
50 .macro pl310_resume
51 .endm
52#endif
53
a1f1c7ef
SG
54ENTRY(v7_cpu_resume)
55 bl v7_invalidate_l1
56 pl310_resume
57 b cpu_resume
58ENDPROC(v7_cpu_resume)
46ec1b26 59#endif
This page took 0.097896 seconds and 5 git commands to generate.