mirror of
https://github.com/linux-msm/debugcc.git
synced 2026-02-25 13:12:32 -08:00
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:
committed by
Bjorn Andersson
parent
bdb901f2ae
commit
360769b5fc
@@ -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);
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
|
||||
#define CORE_CC_BLOCK "core"
|
||||
|
||||
struct measure_clk;
|
||||
|
||||
struct debug_mux {
|
||||
unsigned long phys;
|
||||
void *base;
|
||||
@@ -61,6 +63,7 @@ struct debug_mux {
|
||||
unsigned int ahb_mask;
|
||||
|
||||
void (*premeasure)(struct debug_mux *mux);
|
||||
unsigned long (*measure)(const struct measure_clk *clk);
|
||||
void (*postmeasure)(struct debug_mux *mux);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user