Skip to content

Commit

Permalink
ARM: imx: add sleep for pllv3 relock
Browse files Browse the repository at this point in the history
The pllv3 relock time varies in the range of 50us ~ 500us, depending on
the specific PLL type, e.g. 50us for ARM PLL and 450us for Audio/Video
PLL.  Let's add a usleep_range() call instead of doing busy wait during
relock.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
  • Loading branch information
Shawn Guo committed Nov 11, 2013
1 parent ec9de6c commit 322503a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mach-imx/clk-pllv3.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
Expand Down Expand Up @@ -66,6 +67,7 @@ static int clk_pllv3_prepare(struct clk_hw *hw)
break;
if (time_after(jiffies, timeout))
break;
usleep_range(50, 500);
} while (1);

if (readl_relaxed(pll->base) & BM_PLL_LOCK)
Expand Down

0 comments on commit 322503a

Please sign in to comment.