msm: clock-debug: Print rate and vdd class level in the debug_suspend dump
The dump to the kernel log that currently indicates
what clocks were enabled during suspend also indicates
all the clocks in the path to the root clock for each
enabled clock.
For each clock in that path to the root, indicate what
rate that source is at, and the current vdd level voted
on for that rate.
Example output before this change:
[ 49.128612] mdp_clk -> pll2_clk -> pxo_clk
[ 49.136303] mdp_clk -> pll2_clk -> pxo_clk
Output after this change:
[ 49.128612] mdp_clk [200000000, 2] ->
pll2_clk [800000000] -> pxo_clk [27000000]
[ 49.136303] mdp_clk [200000000, 2] ->
pll2_clk [800000000] -> pxo_clk [27000000]
Change-Id: Ie59392ab3fe67808685fbb0192d326c7071034c5
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
diff --git a/arch/arm/mach-msm/clock-debug.c b/arch/arm/mach-msm/clock-debug.c
index e8c3e05..7263512 100644
--- a/arch/arm/mach-msm/clock-debug.c
+++ b/arch/arm/mach-msm/clock-debug.c
@@ -169,16 +169,23 @@
static int clock_debug_print_clock(struct clk *c)
{
- size_t ln = 0;
- char s[128];
+ char *start = "";
if (!c || !c->count)
return 0;
- ln += snprintf(s, sizeof(s), "\t%s", c->dbg_name);
- while (ln < sizeof(s) && (c = clk_get_parent(c)))
- ln += snprintf(s + ln, sizeof(s) - ln, " -> %s", c->dbg_name);
- pr_info("%s\n", s);
+ pr_info("\t");
+ do {
+ if (c->vdd_class)
+ pr_cont("%s%s [%ld, %lu]", start, c->dbg_name, c->rate,
+ c->vdd_class->cur_level);
+ else
+ pr_cont("%s%s [%ld]", start, c->dbg_name, c->rate);
+ start = " -> ";
+ } while ((c = clk_get_parent(c)));
+
+ pr_cont("\n");
+
return 1;
}