Commit 322503a1 authored by Shawn Guo's avatar Shawn Guo

ARM: imx: add sleep for pllv3 relock

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: default avatarShawn Guo <shawn.guo@linaro.org>
parent ec9de6cd
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/jiffies.h> #include <linux/jiffies.h>
...@@ -66,6 +67,7 @@ static int clk_pllv3_prepare(struct clk_hw *hw) ...@@ -66,6 +67,7 @@ static int clk_pllv3_prepare(struct clk_hw *hw)
break; break;
if (time_after(jiffies, timeout)) if (time_after(jiffies, timeout))
break; break;
usleep_range(50, 500);
} while (1); } while (1);
if (readl_relaxed(pll->base) & BM_PLL_LOCK) if (readl_relaxed(pll->base) & BM_PLL_LOCK)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment