debugcc: allow customizing the measurement process

MSM8996 requires additional setup to measure CPU clocks. Add hooks to
customize the mux enable/disable and measurement process.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
Dmitry Baryshkov
2022-09-23 17:57:15 +03:00
committed by Bjorn Andersson
parent 7c544f0c40
commit 783b4ffdd2
2 changed files with 32 additions and 5 deletions

View File

@@ -59,6 +59,9 @@ struct debug_mux {
unsigned int ahb_reg;
unsigned int ahb_mask;
void (*premeasure)(struct debug_mux *mux);
void (*postmeasure)(struct debug_mux *mux);
};
struct measure_clk {
@@ -75,8 +78,13 @@ struct measure_clk {
struct debugcc_platform {
const char *name;
const struct measure_clk *clocks;
int (*premap)(int devmem);
};
int mmap_mux(int devmem, struct debug_mux *mux);
void mux_enable(struct debug_mux *mux);
void mux_disable(struct debug_mux *mux);
extern struct debugcc_platform msm8936_debugcc;
extern struct debugcc_platform msm8996_debugcc;
extern struct debugcc_platform qcs404_debugcc;