Until now the clock providers were initialized in the order found in
the device tree. This led to have the dependencies between the clocks
not respected: children clocks could be initialized before their
parent clocks.
Instead of forcing each platform to manage its own initialization order,
this patch adds this work inside the framework itself.
Using the data of the device tree the of_clk_init function now delayed
the initialization of a clock provider if its parent provider was not
ready yet.
Signed-off-by: Gregory CLEMENT <gregory.clement@xxxxxxxxxxxxxxxxxx>
[...]
this patch could solve the issues we get on severals mvebu platform
since 3.14-rc1. This is an alternate solution of the patch set sent by
Sebastian. However as it modifies the clock framework itself, it is
more sensible.
I find this solution more elegant than changing the order of the
initialization of the clock at the platform level. However as it
should be tested on more platforms that only the mvebu ones, it would
take some time, and I don't want to still have "broken" platform
during more release candidate. So at the end this patch should be part
of the 3.15 kernel.