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"
21 ENTRY(v7_secondary_startup)
24 ENDPROC(v7_secondary_startup)
29 * The following code is located into the .data section. This is to
30 * allow phys_l2x0_saved_regs to be accessed with a relative load
31 * as we are running on physical address here.
36 #ifdef CONFIG_CACHE_L2X0
38 ldr r2, phys_l2x0_saved_regs
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
43 str r1, [r0, #L2X0_CTRL] @ re-enable L2
46 .globl phys_l2x0_saved_regs
58 ENDPROC(v7_cpu_resume)