Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296269
b: refs/heads/master
c: f3bb3d7
h: refs/heads/master
i:
  296267: 9083a2c
v: v3
  • Loading branch information
Russell King committed Feb 9, 2012
1 parent 898df5b commit eca2e58
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb5e2399f9e504dc78525988c85882643e915da4
refs/heads/master: f3bb3d7422b4161df31e2fd2e503897926d8ffe7
37 changes: 22 additions & 15 deletions trunk/arch/arm/mach-sa1100/sleep.S
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,36 @@
*
* Causes sa11x0 to enter sleep state
*
* Must be aligned to a cacheline.
*/

.balign 32
ENTRY(sa1100_finish_suspend)
@ disable clock switching
mcr p15, 0, r1, c15, c2, 2

@ Adjust memory timing before lowering CPU clock
@ Clock speed adjustment without changing memory timing makes
@ CPU hang in some cases
ldr r0, =MDREFR
ldr r1, [r0]
orr r1, r1, #MDREFR_K1DB2
str r1, [r0]
ldr r6, =MDREFR
ldr r4, [r6]
orr r4, r4, #MDREFR_K1DB2
ldr r5, =PPCR

@ Pre-load __udelay into the I-cache
mov r0, #1
bl __udelay
mov r0, r0

@ The following must all exist in a single cache line to
@ avoid accessing memory until this sequence is complete,
@ otherwise we occasionally hang.

@ Adjust memory timing before lowering CPU clock
str r4, [r6]

@ delay 90us and set CPU PLL to lowest speed
@ fixes resume problem on high speed SA1110
mov r0, #90
bl __udelay
ldr r0, =PPCR
mov r1, #0
str r1, [r0]
str r1, [r5]
mov r0, #90
bl __udelay

Expand Down Expand Up @@ -85,12 +94,10 @@ ENTRY(sa1100_finish_suspend)
bic r5, r5, #FMsk(MSC_RT)
bic r5, r5, #FMsk(MSC_RT)<<16

ldr r6, =MDREFR

ldr r7, [r6]
bic r7, r7, #0x0000FF00
bic r7, r7, #0x000000F0
orr r8, r7, #MDREFR_SLFRSH
bic r7, r7, #0x0000FF00
bic r7, r7, #0x000000F0
orr r8, r7, #MDREFR_SLFRSH

ldr r9, =MDCNFG
ldr r10, [r9]
Expand Down

0 comments on commit eca2e58

Please sign in to comment.