@@ -470,6 +470,8 @@ static void __clk_recalc_rates(struct clk *clk, unsigned long msg)
if (clk->ops->recalc_rate)
clk->rate = clk->ops->recalc_rate(clk);
+ else if (clk->parent)
+ clk->rate = clk->parent->rate;
/* ignore return value for POST_RATE_CHANGE & ABORT_RATE_CHANGE */
if (clk->notifier_count)
@@ -864,6 +866,8 @@ void clk_init(struct device *dev, struct clk *clk)
if (clk->ops->recalc_rate)
clk->rate = clk->ops->recalc_rate(clk);
+ else if (clk->parent)
+ clk->rate = clk->parent->rate;
else
clk->rate = 0;
Signed-off-by: Richard Zhao <richard.zhao@linaro.org> --- drivers/clk/clk.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)