2 * Copyright 2011 Freescale Semiconductor, Inc.
3 * Copyright 2011 Linaro Ltd.
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:
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
13 #include <linux/linkage.h>
14 #include <linux/init.h>
15 #include <asm/asm-offsets.h>
16 #include <asm/hardware/cache-l2x0.h>
18 .section ".text.head", "ax"
25 adr r0, diag_reg_offset
27 add r1, r1, r0 @ r1 = physical &g_diag_reg
29 mcr p15, 0, r0, c15, c0, 1 @ write diagnostic register
32 ENTRY(v7_secondary_startup)
36 ENDPROC(v7_secondary_startup)
39 #ifdef CONFIG_ARM_CPU_SUSPEND
41 * The following code must assume it is running from physical address
42 * where absolute virtual addresses to the data section have to be
43 * turned into relative ones.
46 #ifdef CONFIG_CACHE_L2X0
48 adr r0, l2x0_saved_regs_offset
51 ldr r0, [r2, #L2X0_R_PHY_BASE] @ get physical base of l2x0
52 ldr r1, [r2, #L2X0_R_AUX_CTRL] @ get aux_ctrl value
53 str r1, [r0, #L2X0_AUX_CTRL] @ restore aux_ctrl
55 str r1, [r0, #L2X0_CTRL] @ re-enable L2
58 l2x0_saved_regs_offset:
59 .word l2x0_saved_regs - .
70 ENDPROC(v7_cpu_resume)