kernel: update 3.14 to 3.14.18
[openwrt.git] / target / linux / ipq806x / patches / 0104-clk-qcom-Return-highest-rate-when-round_rate-exceeds.patch
1 From 6417bb8469eb495d7f4e4b6b0ac08cbc1b8606cb Mon Sep 17 00:00:00 2001
2 From: Stephen Boyd <sboyd@codeaurora.org>
3 Date: Fri, 16 May 2014 16:07:10 -0700
4 Subject: [PATCH 104/182] clk: qcom: Return highest rate when round_rate()
5  exceeds plan
6
7 Some drivers may want to call clk_set_rate() with a very large
8 number to force the clock to go as fast as it possibly can
9 without having to know the range between the highest rate and
10 second highest rate. Add support for this by defaulting to the
11 highest rate in the frequency table if we can't find a frequency
12 greater than what is requested.
13
14 Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
15 Signed-off-by: Mike Turquette <mturquette@linaro.org>
16 ---
17  drivers/clk/qcom/clk-rcg2.c |    3 ++-
18  1 file changed, 2 insertions(+), 1 deletion(-)
19
20 --- a/drivers/clk/qcom/clk-rcg2.c
21 +++ b/drivers/clk/qcom/clk-rcg2.c
22 @@ -181,7 +181,8 @@ struct freq_tbl *find_freq(const struct
23                 if (rate <= f->freq)
24                         return f;
25  
26 -       return NULL;
27 +       /* Default to our fastest rate */
28 +       return f - 1;
29  }
30  
31  static long _freq_tbl_determine_rate(struct clk_hw *hw,