diff options
Diffstat (limited to 'arch/arm/mach-at91/pm_slowclock.S')
-rw-r--r-- | arch/arm/mach-at91/pm_slowclock.S | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S index 987fab3d846a..9c5b48e68a71 100644 --- a/arch/arm/mach-at91/pm_slowclock.S +++ b/arch/arm/mach-at91/pm_slowclock.S | |||
@@ -175,8 +175,6 @@ ENTRY(at91_slow_clock) | |||
175 | orr r3, r3, #(1 << 29) /* bit 29 always set */ | 175 | orr r3, r3, #(1 << 29) /* bit 29 always set */ |
176 | str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)] | 176 | str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)] |
177 | 177 | ||
178 | wait_pllalock | ||
179 | |||
180 | /* Save PLLB setting and disable it */ | 178 | /* Save PLLB setting and disable it */ |
181 | ldr r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] | 179 | ldr r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] |
182 | str r3, .saved_pllbr | 180 | str r3, .saved_pllbr |
@@ -184,8 +182,6 @@ ENTRY(at91_slow_clock) | |||
184 | mov r3, #AT91_PMC_PLLCOUNT | 182 | mov r3, #AT91_PMC_PLLCOUNT |
185 | str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] | 183 | str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] |
186 | 184 | ||
187 | wait_pllblock | ||
188 | |||
189 | /* Turn off the main oscillator */ | 185 | /* Turn off the main oscillator */ |
190 | ldr r3, [r1, #(AT91_CKGR_MOR - AT91_PMC)] | 186 | ldr r3, [r1, #(AT91_CKGR_MOR - AT91_PMC)] |
191 | bic r3, r3, #AT91_PMC_MOSCEN | 187 | bic r3, r3, #AT91_PMC_MOSCEN |
@@ -205,13 +201,25 @@ ENTRY(at91_slow_clock) | |||
205 | ldr r3, .saved_pllbr | 201 | ldr r3, .saved_pllbr |
206 | str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] | 202 | str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] |
207 | 203 | ||
204 | tst r3, #(AT91_PMC_MUL & 0xff0000) | ||
205 | bne 1f | ||
206 | tst r3, #(AT91_PMC_MUL & ~0xff0000) | ||
207 | beq 2f | ||
208 | 1: | ||
208 | wait_pllblock | 209 | wait_pllblock |
210 | 2: | ||
209 | 211 | ||
210 | /* Restore PLLA setting */ | 212 | /* Restore PLLA setting */ |
211 | ldr r3, .saved_pllar | 213 | ldr r3, .saved_pllar |
212 | str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)] | 214 | str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)] |
213 | 215 | ||
216 | tst r3, #(AT91_PMC_MUL & 0xff0000) | ||
217 | bne 3f | ||
218 | tst r3, #(AT91_PMC_MUL & ~0xff0000) | ||
219 | beq 4f | ||
220 | 3: | ||
214 | wait_pllalock | 221 | wait_pllalock |
222 | 4: | ||
215 | 223 | ||
216 | #ifdef SLOWDOWN_MASTER_CLOCK | 224 | #ifdef SLOWDOWN_MASTER_CLOCK |
217 | /* | 225 | /* |