Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2430a94d authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Stephen Boyd
Browse files

clk: fix __clk_init_parent() for single parent clocks



Before commit b3d192d5121f ("clk: simplify __clk_init_parent()"),
__clk_init_parent() called .get_parent() only for multi-parent
clocks.  That commit changed the behavior to call .get_parent()
if available even for single-parent clocks and root clocks.

It turned out a problem because there are some single-parent clocks
that implement .get_parent() callback and return non-zero index.
The SOCFPGA clock is the case; the commit broke the SOCFPGA boards.

To keep the original behavior, invoke .get_parent() only when
num_parents is greater than 1.

Fixes: b3d192d5121f ("clk: simplify __clk_init_parent()")
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Reported-by: default avatarDinh Nguyen <dinguyen@opensource.altera.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 66f5ce25
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment