Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions debugcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,24 +201,25 @@ unsigned long measure_mccc(const struct measure_clk *clk)
static void measure(const struct measure_clk *clk)
{
unsigned long clk_rate;
struct debug_mux *gcc = clk->primary;

if (!leaf_enabled(gcc, clk->leaf)) {
if (!leaf_enabled(clk->primary, clk->leaf)) {
printf("%50s: skipping\n", clk->name);
return;
}

if (clk->leaf)
mux_prepare_enable(clk->leaf, clk->leaf_mux);

mux_prepare_enable(clk->primary, clk->mux);
if (clk->primary)
mux_prepare_enable(clk->primary, clk->mux);

if (clk->leaf && clk->leaf->measure)
clk_rate = clk->leaf->measure(clk);
else
clk_rate = measure_default(clk);

mux_disable(clk->primary);
if (clk->primary)
mux_disable(clk->primary);

if (clk->leaf)
mux_disable(clk->leaf);
Expand Down
2 changes: 1 addition & 1 deletion sc8280xp.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ static struct measure_clk sc8280xp_clocks[] = {
{ "disp1_cc_mdss_vsync_clk", &gcc, 0x82, &disp1_cc, 0x17 },
{ "disp1_cc_sleep_clk", &gcc, 0x82, &disp1_cc, 0x46 },
{ "disp1_cc_xo_clk", &gcc, 0x82, &disp1_cc, 0x45 },
{ "measure_only_mccc_clk", &gcc, 0xfeedbeef, &mc_cc, 0x50 },
{ "measure_only_mccc_clk", NULL, 0, &mc_cc, 0x50 },
{}
};

Expand Down