Commit b37fea4f authored by Matt Wagantall's avatar Matt Wagantall
Browse files

msm: clock: Make sure clock parents are set before handoff



The loop that calls clk_set_parent() on each clock in the table is the
same one that performs clock handoffs and calls clk_prepare_enable()
on them. For complex clock hierarchies, it's possible that a clock's
grandparent would not yet be set by the time clk_prepare_enable() is
called.

Fix this by breaking the loop into two. The first loop iterates over
all the clocks and sets up their parents. The second performs the
handoff operations which may depend on the parents being set.

With this, there is still no guarantee that a clock's parent is
handed off before the clock itself, but we're one step closer to
a robust solution.

Change-Id: I4dece682e6d9a4c60746f8639f98789c2e23b20f
Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
parent e1482bf1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment