aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAnders Larsen <al@alarsen.net>2010-04-08 06:48:16 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-04-09 03:31:04 -0400
commit9823f1a8463fb631fe965110fe19adeb3df239c4 (patch)
treee55e3f1a8ba2f1dee33a3d189061027e34fd4c15 /arch
parentbb3c9d4f851d51bb6302ef0df830dcec88d7c529 (diff)
ARM: 6043/1: AT91 slow-clock resume: Don't wait for a disabled PLL to lock
at91 slow-clock resume: Don't wait for a disabled PLL to lock. We run into this problem with the PLLB on the at91: ohci-at91 disables the PLLB when going to suspend. The slowclock code however tries to do the same: It saves the PLLB register value and when restoring the value during resume, it waits for the PLLB to lock again. However the PLL will never lock and the loop would run into its timeout because the slowclock code just stored and restored an empty register. This fixes the problem by only restoring PLLA/PLLB when they were enabled at suspend time. Cc: Andrew Victor <avictor.za@gmail.com> Signed-off-by: Anders Larsen <al@alarsen.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-at91/pm_slowclock.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S
index 987fab3d846a..9fcbd6ca0090 100644
--- a/arch/arm/mach-at91/pm_slowclock.S
+++ b/arch/arm/mach-at91/pm_slowclock.S
@@ -205,13 +205,25 @@ ENTRY(at91_slow_clock)
205 ldr r3, .saved_pllbr 205 ldr r3, .saved_pllbr
206 str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)] 206 str r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)]
207 207
208 tst r3, #(AT91_PMC_MUL & 0xff0000)
209 bne 1f
210 tst r3, #(AT91_PMC_MUL & ~0xff0000)
211 beq 2f
2121:
208 wait_pllblock 213 wait_pllblock
2142:
209 215
210 /* Restore PLLA setting */ 216 /* Restore PLLA setting */
211 ldr r3, .saved_pllar 217 ldr r3, .saved_pllar
212 str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)] 218 str r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)]
213 219
220 tst r3, #(AT91_PMC_MUL & 0xff0000)
221 bne 3f
222 tst r3, #(AT91_PMC_MUL & ~0xff0000)
223 beq 4f
2243:
214 wait_pllalock 225 wait_pllalock
2264:
215 227
216#ifdef SLOWDOWN_MASTER_CLOCK 228#ifdef SLOWDOWN_MASTER_CLOCK
217 /* 229 /*