diff options
author | Gregory CLEMENT <gregory.clement@free-electrons.com> | 2014-03-28 07:21:16 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-04-22 20:24:35 -0400 |
commit | 16c79a3776c17965dedab4732d925f6098df91c1 (patch) | |
tree | 8a2ad6402ddc7a22c61178efd11b25d7dae89d30 /arch/arm/mm/proc-v7.S | |
parent | 64d3b6a3f480154b6727dd2187f5f2b58c15da77 (diff) |
ARM: 8013/1: PJ4B: Add cpu_suspend/cpu_resume hooks for PJ4B
PJ4B needs extra instructions for suspend and resume, so instead of
using the armv7 version, this commit introduces specific versions for
PJ4B.
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/proc-v7.S')
-rw-r--r-- | arch/arm/mm/proc-v7.S | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 195731d3813b..b74ea60891d5 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -169,9 +169,31 @@ ENDPROC(cpu_pj4b_do_idle) | |||
169 | globl_equ cpu_pj4b_do_idle, cpu_v7_do_idle | 169 | globl_equ cpu_pj4b_do_idle, cpu_v7_do_idle |
170 | #endif | 170 | #endif |
171 | globl_equ cpu_pj4b_dcache_clean_area, cpu_v7_dcache_clean_area | 171 | globl_equ cpu_pj4b_dcache_clean_area, cpu_v7_dcache_clean_area |
172 | globl_equ cpu_pj4b_do_suspend, cpu_v7_do_suspend | 172 | #ifdef CONFIG_ARM_CPU_SUSPEND |
173 | globl_equ cpu_pj4b_do_resume, cpu_v7_do_resume | 173 | ENTRY(cpu_pj4b_do_suspend) |
174 | globl_equ cpu_pj4b_suspend_size, cpu_v7_suspend_size | 174 | stmfd sp!, {r6 - r10} |
175 | mrc p15, 1, r6, c15, c1, 0 @ save CP15 - extra features | ||
176 | mrc p15, 1, r7, c15, c2, 0 @ save CP15 - Aux Func Modes Ctrl 0 | ||
177 | mrc p15, 1, r8, c15, c1, 2 @ save CP15 - Aux Debug Modes Ctrl 2 | ||
178 | mrc p15, 1, r9, c15, c1, 1 @ save CP15 - Aux Debug Modes Ctrl 1 | ||
179 | mrc p15, 0, r10, c9, c14, 0 @ save CP15 - PMC | ||
180 | stmia r0!, {r6 - r10} | ||
181 | ldmfd sp!, {r6 - r10} | ||
182 | b cpu_v7_do_suspend | ||
183 | ENDPROC(cpu_pj4b_do_suspend) | ||
184 | |||
185 | ENTRY(cpu_pj4b_do_resume) | ||
186 | ldmia r0!, {r6 - r10} | ||
187 | mcr p15, 1, r6, c15, c1, 0 @ save CP15 - extra features | ||
188 | mcr p15, 1, r7, c15, c2, 0 @ save CP15 - Aux Func Modes Ctrl 0 | ||
189 | mcr p15, 1, r8, c15, c1, 2 @ save CP15 - Aux Debug Modes Ctrl 2 | ||
190 | mcr p15, 1, r9, c15, c1, 1 @ save CP15 - Aux Debug Modes Ctrl 1 | ||
191 | mcr p15, 0, r10, c9, c14, 0 @ save CP15 - PMC | ||
192 | b cpu_v7_do_resume | ||
193 | ENDPROC(cpu_pj4b_do_resume) | ||
194 | #endif | ||
195 | .globl cpu_pj4b_suspend_size | ||
196 | .equ cpu_pj4b_suspend_size, 4 * 14 | ||
175 | 197 | ||
176 | #endif | 198 | #endif |
177 | 199 | ||