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

Skip to content
Commit 1b93788f authored by Mike Tipton's avatar Mike Tipton
Browse files

clk: qcom: clk-debug: Fix clk_measure files not being created



The clk_measure debugfs files are created in the debug_init() callback
and require the debugcc provider to have probed first and to have called
clk_debug_measure_register(). However, the debugcc provider itself
requires all other clock providers to have probed first in order to
lookup their regmaps. So they are essentially interdependent.

This has worked previously since when everything is built-in, all clock
providers and debugcc generally probe prior to late_init. Prior to
late_init, the debug_init() callbacks aren't called, so there are no
interdependencies and it's only debugcc that depends on the other clock
providers. At late_init, the debug_init() callbacks are called for any
clocks already registered. After late-init, the debug_init() callbacks
are called when each clock is registered, which introduces the
interdependencies. If the probes are delayed to after late_init, then
the clk_measure nodes aren't created in debug_init() due to the missing
debugcc provider. The debug_init() callback is never called again and
the files are never created.

We can't rely on clock controllers being probed prior to late_init. Even
if built-in, they can be delayed for various reasons as has been
observed after recent kernel changes. If built as DLKMs, then they are
guaranteed to be loaded after late_init.

Update the code to always create the clk_measure files when debug_init()
is called, even if the debugcc provider hasn't probed yet. If the
clk_measure files are read prior to debugcc probe, then just return an
error.

Change-Id: Ia05a1dba86a84d70a03c8f05533ca9e1d1e18a90
Signed-off-by: default avatarMike Tipton <mdtipton@codeaurora.org>
parent bd0cb901
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