aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/clk-pllv3.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-10-30 03:12:55 -0400
committerShawn Guo <shawn.guo@linaro.org>2013-11-11 09:58:44 -0500
commit322503a15740bd9383bb4ed452e5dd5a40598170 (patch)
tree0c005aea931efcd522b9ec215516d8ef0a2e740a /arch/arm/mach-imx/clk-pllv3.c
parentec9de6cd95a1ee326269699777301d5e1d5ddb75 (diff)
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: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/clk-pllv3.c')
-rw-r--r--arch/arm/mach-imx/clk-pllv3.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/clk-pllv3.c b/arch/arm/mach-imx/clk-pllv3.c
index f6640b6a7b31..c9ca19184420 100644
--- a/arch/arm/mach-imx/clk-pllv3.c
+++ b/arch/arm/mach-imx/clk-pllv3.c
@@ -12,6 +12,7 @@
12 12
13#include <linux/clk.h> 13#include <linux/clk.h>
14#include <linux/clk-provider.h> 14#include <linux/clk-provider.h>
15#include <linux/delay.h>
15#include <linux/io.h> 16#include <linux/io.h>
16#include <linux/slab.h> 17#include <linux/slab.h>
17#include <linux/jiffies.h> 18#include <linux/jiffies.h>
@@ -66,6 +67,7 @@ static int clk_pllv3_prepare(struct clk_hw *hw)
66 break; 67 break;
67 if (time_after(jiffies, timeout)) 68 if (time_after(jiffies, timeout))
68 break; 69 break;
70 usleep_range(50, 500);
69 } while (1); 71 } while (1);
70 72
71 if (readl_relaxed(pll->base) & BM_PLL_LOCK) 73 if (readl_relaxed(pll->base) & BM_PLL_LOCK)