From: Hai Li <hali@codeaurora.org>
To: linux-kernel@vger.kernel.org, sboyd@codeaurora.org
Cc: mturquette@linaro.org, georgi.djakov@linaro.org,
tomeu.vizoso@collabora.com, architt@codeaurora.org,
Hai Li <hali@codeaurora.org>
Subject: [PATCH] clk: qcom: Use parent rate when set rate to pixel RCG clock
Date: Thu, 25 Jun 2015 18:35:33 -0400 [thread overview]
Message-ID: <1435271733-24455-1-git-send-email-hali@codeaurora.org> (raw)
Since the parent rate has been recalculated, pixel RCG clock
should rely on it to find the correct M/N values during set_rate,
instead of calling __clk_round_rate() to its parent again.
Signed-off-by: Hai Li <hali@codeaurora.org>
---
drivers/clk/qcom/clk-rcg2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/clk-rcg2.c b/drivers/clk/qcom/clk-rcg2.c
index 4d3e2f7..b344899 100644
--- a/drivers/clk/qcom/clk-rcg2.c
+++ b/drivers/clk/qcom/clk-rcg2.c
@@ -615,10 +615,11 @@ static int clk_pixel_set_rate(struct clk_hw *hw, unsigned long rate,
if (!parent)
return -EINVAL;
+ src_rate = parent_rate;
+
for (; frac->num; frac++) {
request = (rate * frac->den) / frac->num;
- src_rate = __clk_round_rate(parent, request);
if ((src_rate < (request - delta)) ||
(src_rate > (request + delta)))
continue;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
next reply other threads:[~2015-06-25 22:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 22:35 Hai Li [this message]
2015-06-26 10:46 ` [PATCH] clk: qcom: Use parent rate when set rate to pixel RCG clock Archit Taneja
2015-07-02 16:48 ` Stephen Boyd
2015-07-06 14:49 ` [PATCH v2] " Hai Li
2015-07-06 19:32 ` Stephen Boyd
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=1435271733-24455-1-git-send-email-hali@codeaurora.org \
--to=hali@codeaurora.org \
--cc=architt@codeaurora.org \
--cc=georgi.djakov@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=sboyd@codeaurora.org \
--cc=tomeu.vizoso@collabora.com \
/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