aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorSoren Brinkmann <soren.brinkmann@xilinx.com>2013-04-16 13:06:50 -0400
committerMike Turquette <mturquette@linaro.org>2013-06-15 17:34:41 -0400
commitf3aab5d61400b794ec759b9345e93e7ba57eb369 (patch)
tree2b2c865e022402c483e9d7ba62ae2af5f29cfdd7 /drivers/clk
parent60bea3b547005204311068b5617984bf3cfbf3d9 (diff)
clk: Always notify whole subtree when reparenting
A clock's notifier count only reflects notifiers which are registered directly for that clock. A reparent operation though affects the whole subtree because of a potential rate change. When issuing the pre rate change notifications only the notifier count for the clock to be changed is considered and notifiers for subclocks may never be called. Resulting in clocks in the subtree which have registered notifiers, may receive a POST_- or ABORT_RATE_CHANGE notification, without a PRE_RATE_CHANGE_NOTIFICATION. Therefore always traverse the whole subtree when issueing pre rate change notifications during a reparent operation. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/clk.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 2e669a87fb15..edf3fe100542 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1493,8 +1493,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
1493 } 1493 }
1494 1494
1495 /* propagate PRE_RATE_CHANGE notifications */ 1495 /* propagate PRE_RATE_CHANGE notifications */
1496 if (clk->notifier_count) 1496 ret = __clk_speculate_rates(clk, p_rate);
1497 ret = __clk_speculate_rates(clk, p_rate);
1498 1497
1499 /* abort if a driver objects */ 1498 /* abort if a driver objects */
1500 if (ret & NOTIFY_STOP_MASK) 1499 if (ret & NOTIFY_STOP_MASK)