From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ARM: imx: add sleep for pllv3 relock
Date: Fri, 1 Nov 2013 17:02:23 +0800 [thread overview]
Message-ID: <1383296545-18652-2-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1383296545-18652-1-git-send-email-shawn.guo@linaro.org>
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 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-imx/clk-pllv3.c b/arch/arm/mach-imx/clk-pllv3.c
index f6640b6..c9ca191 100644
--- a/arch/arm/mach-imx/clk-pllv3.c
+++ b/arch/arm/mach-imx/clk-pllv3.c
@@ -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)
--
1.7.9.5
next prev parent reply other threads:[~2013-11-01 9:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 9:02 [PATCH 0/3] ARM: imx: pllv3 relock fixes Shawn Guo
2013-11-01 9:02 ` Shawn Guo [this message]
2013-11-01 9:02 ` [PATCH 2/3] ARM: imx: pllv3 needs relock in .set_rate() call Shawn Guo
2013-11-01 9:02 ` [PATCH 3/3] ARM: imx: set up pllv3 POWER and BYPASS sequentially Shawn Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383296545-18652-2-git-send-email-shawn.guo@linaro.org \
--to=shawn.guo@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).