Skip to content
Commit 66d95064 authored by Jerome Brunet's avatar Jerome Brunet Committed by Stephen Boyd
Browse files

clk: walk orphan list on clock provider registration



So far, we walked the orphan list every time a new clock was registered
in CCF. This was fine since the clocks were only referenced by name.

Now that the clock can be referenced through DT, it is not enough:
* Controller A register first a reference clocks from controller B
  through DT.
* Controller B register all its clocks then register the provider.

Each time controller B registers a new clock, the orphan list is walked
but it can't match since the provider is registered yet. When the
provider is finally registered, the orphan list is not walked unless
another clock is registered afterward.

This can lead to situation where some clocks remain orphaned even if
the parent is available.

Walking the orphan list on provider registration solves the problem.

Reported-by: default avatarJian Hu <jian.hu@amlogic.com>
Fixes: fc0c209c ("clk: Allow parents to be specified without string names")
Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
Link: https://lkml.kernel.org/r/20191203080805.104628-1-jbrunet@baylibre.com


Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent e42617b8
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