summaryrefslogtreecommitdiff
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 62ecac53b0a2..c6e8866289b4 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -587,8 +587,12 @@ unsigned long __clk_round_rate(struct clk *clk, unsigned long rate)
if (!clk)
return -EINVAL;
- if (!clk->ops->round_rate)
- return clk->rate;
+ if (!clk->ops->round_rate) {
+ if (clk->flags & CLK_SET_RATE_PARENT)
+ return __clk_round_rate(clk->parent, rate);
+ else
+ return clk->rate;
+ }
if (clk->parent)
parent_rate = clk->parent->rate;