diff options
Diffstat (limited to 'arch/arm/mm/proc-xsc3.S')
-rw-r--r-- | arch/arm/mm/proc-xsc3.S | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 755e1bf22681..abf0507a08ae 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -406,24 +406,23 @@ ENTRY(cpu_xsc3_set_pte_ext) | |||
406 | .align | 406 | .align |
407 | 407 | ||
408 | .globl cpu_xsc3_suspend_size | 408 | .globl cpu_xsc3_suspend_size |
409 | .equ cpu_xsc3_suspend_size, 4 * 7 | 409 | .equ cpu_xsc3_suspend_size, 4 * 6 |
410 | #ifdef CONFIG_PM_SLEEP | 410 | #ifdef CONFIG_PM_SLEEP |
411 | ENTRY(cpu_xsc3_do_suspend) | 411 | ENTRY(cpu_xsc3_do_suspend) |
412 | stmfd sp!, {r4 - r10, lr} | 412 | stmfd sp!, {r4 - r9, lr} |
413 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode | 413 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode |
414 | mrc p15, 0, r5, c15, c1, 0 @ CP access reg | 414 | mrc p15, 0, r5, c15, c1, 0 @ CP access reg |
415 | mrc p15, 0, r6, c13, c0, 0 @ PID | 415 | mrc p15, 0, r6, c13, c0, 0 @ PID |
416 | mrc p15, 0, r7, c3, c0, 0 @ domain ID | 416 | mrc p15, 0, r7, c3, c0, 0 @ domain ID |
417 | mrc p15, 0, r8, c2, c0, 0 @ translation table base addr | 417 | mrc p15, 0, r8, c1, c0, 1 @ auxiliary control reg |
418 | mrc p15, 0, r9, c1, c0, 1 @ auxiliary control reg | 418 | mrc p15, 0, r9, c1, c0, 0 @ control reg |
419 | mrc p15, 0, r10, c1, c0, 0 @ control reg | ||
420 | bic r4, r4, #2 @ clear frequency change bit | 419 | bic r4, r4, #2 @ clear frequency change bit |
421 | stmia r0, {r4 - r10} @ store cp regs | 420 | stmia r0, {r4 - r9} @ store cp regs |
422 | ldmia sp!, {r4 - r10, pc} | 421 | ldmia sp!, {r4 - r9, pc} |
423 | ENDPROC(cpu_xsc3_do_suspend) | 422 | ENDPROC(cpu_xsc3_do_suspend) |
424 | 423 | ||
425 | ENTRY(cpu_xsc3_do_resume) | 424 | ENTRY(cpu_xsc3_do_resume) |
426 | ldmia r0, {r4 - r10} @ load cp regs | 425 | ldmia r0, {r4 - r9} @ load cp regs |
427 | mov ip, #0 | 426 | mov ip, #0 |
428 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I & D caches, BTB | 427 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I & D caches, BTB |
429 | mcr p15, 0, ip, c7, c10, 4 @ drain write (&fill) buffer | 428 | mcr p15, 0, ip, c7, c10, 4 @ drain write (&fill) buffer |
@@ -433,15 +432,10 @@ ENTRY(cpu_xsc3_do_resume) | |||
433 | mcr p15, 0, r5, c15, c1, 0 @ CP access reg | 432 | mcr p15, 0, r5, c15, c1, 0 @ CP access reg |
434 | mcr p15, 0, r6, c13, c0, 0 @ PID | 433 | mcr p15, 0, r6, c13, c0, 0 @ PID |
435 | mcr p15, 0, r7, c3, c0, 0 @ domain ID | 434 | mcr p15, 0, r7, c3, c0, 0 @ domain ID |
436 | mcr p15, 0, r8, c2, c0, 0 @ translation table base addr | 435 | orr r1, r1, #0x18 @ cache the page table in L2 |
437 | mcr p15, 0, r9, c1, c0, 1 @ auxiliary control reg | 436 | mcr p15, 0, r1, c2, c0, 0 @ translation table base addr |
438 | 437 | mcr p15, 0, r8, c1, c0, 1 @ auxiliary control reg | |
439 | @ temporarily map resume_turn_on_mmu into the page table, | 438 | mov r0, r9 @ control register |
440 | @ otherwise prefetch abort occurs after MMU is turned on | ||
441 | mov r0, r10 @ control register | ||
442 | mov r2, r8, lsr #14 @ get TTB0 base | ||
443 | mov r2, r2, lsl #14 | ||
444 | ldr r3, =0x542e @ section flags | ||
445 | b cpu_resume_mmu | 439 | b cpu_resume_mmu |
446 | ENDPROC(cpu_xsc3_do_resume) | 440 | ENDPROC(cpu_xsc3_do_resume) |
447 | #endif | 441 | #endif |