clk: qcom: Return highest rate when round_rate() exceeds plan

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>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
This commit is contained in:
Stephen Boyd 2014-05-16 16:07:10 -07:00 коммит произвёл Mike Turquette
Родитель 437ae6a1b8
Коммит 9d011f3b71
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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,