|
@@ -140,8 +140,12 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
|
|
|
spin_lock_irqsave(&clockfw_lock, flags);
|
|
|
if (arch_clock->clk_set_rate)
|
|
|
ret = arch_clock->clk_set_rate(clk, rate);
|
|
|
- if (ret == 0 && (clk->flags & RATE_PROPAGATES))
|
|
|
- propagate_rate(clk);
|
|
|
+ if (ret == 0) {
|
|
|
+ if (clk->recalc)
|
|
|
+ clk->recalc(clk);
|
|
|
+ if (clk->flags & RATE_PROPAGATES)
|
|
|
+ propagate_rate(clk);
|
|
|
+ }
|
|
|
spin_unlock_irqrestore(&clockfw_lock, flags);
|
|
|
|
|
|
return ret;
|
|
@@ -159,8 +163,12 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
|
|
|
spin_lock_irqsave(&clockfw_lock, flags);
|
|
|
if (arch_clock->clk_set_parent)
|
|
|
ret = arch_clock->clk_set_parent(clk, parent);
|
|
|
- if (ret == 0 && (clk->flags & RATE_PROPAGATES))
|
|
|
- propagate_rate(clk);
|
|
|
+ if (ret == 0) {
|
|
|
+ if (clk->recalc)
|
|
|
+ clk->recalc(clk);
|
|
|
+ if (clk->flags & RATE_PROPAGATES)
|
|
|
+ propagate_rate(clk);
|
|
|
+ }
|
|
|
spin_unlock_irqrestore(&clockfw_lock, flags);
|
|
|
|
|
|
return ret;
|