]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: imx: add sleep for pllv3 relock
authorShawn Guo <shawn.guo@linaro.org>
Wed, 30 Oct 2013 07:12:55 +0000 (15:12 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Mon, 11 Nov 2013 14:58:44 +0000 (22:58 +0800)
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>
arch/arm/mach-imx/clk-pllv3.c

index f6640b6a7b3128a7ca6a6d8d31578419ea1be431..c9ca19184420da724e4e1d36ffea69701cbad4d0 100644 (file)
@@ -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>
@@ -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)