diff options
Diffstat (limited to 'arch/arm/mach-omap2/sram34xx.S')
-rw-r--r-- | arch/arm/mach-omap2/sram34xx.S | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/arm/mach-omap2/sram34xx.S b/arch/arm/mach-omap2/sram34xx.S index 84781a6cd263..8d4a88c30718 100644 --- a/arch/arm/mach-omap2/sram34xx.S +++ b/arch/arm/mach-omap2/sram34xx.S | |||
@@ -42,10 +42,14 @@ | |||
42 | * r0 = sdrc_rfr_ctrl r1 = sdrc_actim_ctrla r2 = sdrc_actim_ctrlb r3 = M2 | 42 | * r0 = sdrc_rfr_ctrl r1 = sdrc_actim_ctrla r2 = sdrc_actim_ctrlb r3 = M2 |
43 | * r4 = Unlock SDRC DLL? (1 = yes, 0 = no) -- only unlock DLL for | 43 | * r4 = Unlock SDRC DLL? (1 = yes, 0 = no) -- only unlock DLL for |
44 | * SDRC rates < 83MHz | 44 | * SDRC rates < 83MHz |
45 | * r5 = number of MPU cycles to wait for SDRC to stabilize after | ||
46 | * reprogramming the SDRC when switching to a slower MPU speed | ||
47 | * | ||
45 | */ | 48 | */ |
46 | ENTRY(omap3_sram_configure_core_dpll) | 49 | ENTRY(omap3_sram_configure_core_dpll) |
47 | stmfd sp!, {r1-r12, lr} @ store regs to stack | 50 | stmfd sp!, {r1-r12, lr} @ store regs to stack |
48 | ldr r4, [sp, #52] @ pull extra args off the stack | 51 | ldr r4, [sp, #52] @ pull extra args off the stack |
52 | ldr r5, [sp, #56] @ load extra args from the stack | ||
49 | dsb @ flush buffered writes to interconnect | 53 | dsb @ flush buffered writes to interconnect |
50 | cmp r3, #0x2 | 54 | cmp r3, #0x2 |
51 | blne configure_sdrc | 55 | blne configure_sdrc |
@@ -59,7 +63,11 @@ ENTRY(omap3_sram_configure_core_dpll) | |||
59 | bleq wait_dll_unlock | 63 | bleq wait_dll_unlock |
60 | blne wait_dll_lock | 64 | blne wait_dll_lock |
61 | cmp r3, #0x1 | 65 | cmp r3, #0x1 |
62 | blne configure_sdrc | 66 | beq return_to_sdram |
67 | bl configure_sdrc | ||
68 | mov r12, r5 @ if slowing, wait for SDRC to stabilize | ||
69 | bl wait_clk_stable | ||
70 | return_to_sdram: | ||
63 | isb @ prevent speculative exec past here | 71 | isb @ prevent speculative exec past here |
64 | mov r0, #0 @ return value | 72 | mov r0, #0 @ return value |
65 | ldmfd sp!, {r1-r12, pc} @ restore regs and return | 73 | ldmfd sp!, {r1-r12, pc} @ restore regs and return |
@@ -106,16 +114,6 @@ configure_core_dpll: | |||
106 | wait_clk_stable: | 114 | wait_clk_stable: |
107 | subs r12, r12, #1 | 115 | subs r12, r12, #1 |
108 | bne wait_clk_stable | 116 | bne wait_clk_stable |
109 | nop | ||
110 | nop | ||
111 | nop | ||
112 | nop | ||
113 | nop | ||
114 | nop | ||
115 | nop | ||
116 | nop | ||
117 | nop | ||
118 | nop | ||
119 | bx lr | 117 | bx lr |
120 | enable_sdrc: | 118 | enable_sdrc: |
121 | ldr r11, omap3_cm_iclken1_core | 119 | ldr r11, omap3_cm_iclken1_core |