clk: defer clk_gets on orphan clocks
Orphan clocks or children of orphan clocks don't have rate information at
all and can produce strange results if they're allowed to be used and the
parent becomes available later on.
This change, based on one from Stephen Boyd, defers __clk_create_clk()
calls on orphan clocks in all regular cases.
One special case that gets handled, is accessing such orphan clocks when
handling assigned-clocks configurations. In the boot-defaults it may be
the case that a clock is connected to an orphan parent which then might
be needed to get reparented to an actually usable clock using
assigned-clock-parents. In this case even orphaned clocks should be
usable, but only for the set-parent case.
The added of_clk_get_from_provider_with_orphans() is only available
to ccf internal parts to prevent abuse.
(am from https://patchwork.kernel.org/patch/
7690221/)
Change-Id: I2e603dab191fa8a431adebad1f9d482d52b7deeb
Signed-off-by: Heiko Stuebner <heiko.stuebner@collabora.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>