Commit f4d8af2e authored by Shawn Guo's avatar Shawn Guo Committed by Mike Turquette

clk: propagate round_rate for CLK_SET_RATE_PARENT case

Need to propagate round_rate call for the clk that has no .round_rate
operation but with flag CLK_SET_RATE_PARENT set.

For example, clk_mux is a clk with no .round_rate operation.  However,
it could likely be in a clk_set_rate propagation path, saying it has
parent clk who has .round_rate and .set_rate operations.
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
parent 1c0035d7
...@@ -587,8 +587,12 @@ unsigned long __clk_round_rate(struct clk *clk, unsigned long rate) ...@@ -587,8 +587,12 @@ unsigned long __clk_round_rate(struct clk *clk, unsigned long rate)
if (!clk) if (!clk)
return -EINVAL; return -EINVAL;
if (!clk->ops->round_rate) if (!clk->ops->round_rate) {
if (clk->flags & CLK_SET_RATE_PARENT)
return __clk_round_rate(clk->parent, rate);
else
return clk->rate; return clk->rate;
}
if (clk->parent) if (clk->parent)
parent_rate = clk->parent->rate; parent_rate = clk->parent->rate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment