clk: do not vote for vdd_class level with 0 Hz rate_max
Inside of the clk_find_vdd_level() function when searching for the vdd_class level associated with a given clock frequency, ignore levels which have rate_max[] of 0 Hz. This ensures that the lowest non-OFF level is requested for uninitialized clock rates of 0 Hz. Change-Id: I83ed8564087728bd2854087f2e45f83319c6eb92 Signed-off-by: David Collins <collinsd@codeaurora.org>
This commit is contained in:
@@ -606,7 +606,8 @@ static int clk_find_vdd_level(struct clk_core *clk, unsigned long rate)
|
||||
*/
|
||||
for (level = 0; level < clk->num_rate_max; level++)
|
||||
if (DIV_ROUND_CLOSEST(rate, 1000) <=
|
||||
DIV_ROUND_CLOSEST(clk->rate_max[level], 1000))
|
||||
DIV_ROUND_CLOSEST(clk->rate_max[level], 1000) &&
|
||||
clk->rate_max[level] > 0)
|
||||
break;
|
||||
|
||||
if (level == clk->num_rate_max) {
|
||||
|
||||
Reference in New Issue
Block a user