Skip to content

Commit

Permalink
clk: Always notify whole subtree when reparenting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Soren Brinkmann authored and Mike Turquette committed Jun 15, 2013
1 parent 60bea3b commit f3aab5d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1493,8 +1493,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
}

/* propagate PRE_RATE_CHANGE notifications */
if (clk->notifier_count)
ret = __clk_speculate_rates(clk, p_rate);
ret = __clk_speculate_rates(clk, p_rate);

/* abort if a driver objects */
if (ret & NOTIFY_STOP_MASK)
Expand Down

0 comments on commit f3aab5d

Please sign in to comment.