debugcc: allow leaf muxes to override measurement function

MCCC (memory clock controller) uses non-standard measuring process (just
read the rate and return). Provide a way to override default
measurement proces with the leaf cc hook.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
Dmitry Baryshkov
2023-01-18 07:24:57 +02:00
committed by Bjorn Andersson
parent bdb901f2ae
commit 360769b5fc
2 changed files with 7 additions and 1 deletions

View File

@@ -195,7 +195,10 @@ static void measure(const struct measure_clk *clk)
mux_prepare_enable(clk->primary, clk->mux);
clk_rate = measure_default(clk);
if (clk->leaf && clk->leaf->measure)
clk_rate = clk->leaf->measure(clk);
else
clk_rate = measure_default(clk);
mux_disable(clk->primary);