From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/7] clk: qcom: Return highest rate when round_rate() exceeds plan
Date: Fri, 16 May 2014 16:07:10 -0700 [thread overview]
Message-ID: <1400281634-9313-4-git-send-email-sboyd@codeaurora.org> (raw)
In-Reply-To: <1400281634-9313-1-git-send-email-sboyd@codeaurora.org>
Some drivers may want to call clk_set_rate() with a very large
number to force the clock to go as fast as it possibly can
without having to know the range between the highest rate and
second highest rate. Add support for this by defaulting to the
highest rate in the frequency table if we can't find a frequency
greater than what is requested.
Signed-off-by: Stephen Boyd <sboyd@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 0996a3a39855..cbecaec30562 100644
--- a/drivers/clk/qcom/clk-rcg2.c
+++ b/drivers/clk/qcom/clk-rcg2.c
@@ -181,7 +181,8 @@ struct freq_tbl *find_freq(const struct freq_tbl *f, unsigned long rate)
if (rate <= f->freq)
return f;
- return NULL;
+ /* Default to our fastest rate */
+ return f - 1;
}
static long _freq_tbl_determine_rate(struct clk_hw *hw,
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2014-05-16 23:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 23:07 [PATCH 0/7] qcom clock updates Stephen Boyd
2014-05-16 23:07 ` [PATCH 1/7] clk: qcom: Fix clk_rcg2_is_enabled() check Stephen Boyd
2014-05-16 23:07 ` [PATCH 2/7] clk: qcom: Fix mmcc-8974's PLL configurations Stephen Boyd
2014-05-16 23:07 ` Stephen Boyd [this message]
2014-05-16 23:07 ` [PATCH 4/7] clk: qcom: Support display RCG clocks Stephen Boyd
2014-05-16 23:07 ` [PATCH 5/7] clk: qcom: Properly support display clocks on msm8974 Stephen Boyd
2014-05-16 23:07 ` [PATCH 6/7] clk: qcom: Support msm8974pro global clock control hardware Stephen Boyd
2014-05-16 23:07 ` [PATCH 7/7] clk: qcom: Return error pointers for unimplemented clocks Stephen Boyd
2014-05-29 4:53 ` [PATCH 0/7] qcom clock updates Mike Turquette
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=1400281634-9313-4-git-send-email-sboyd@codeaurora.org \
--to=sboyd@codeaurora.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).