msm: clock: Print clock rates for handoff in one place as pr_debug's
Rather than delegating the task of printing the rates of handed-off
clocks to each of the handoff functions, print them in clock.c. To
cut down on log noise, downgrade them from pr_info to pr_debug.
Also, remove handoff prints for rateless clock in clock-local2.c,
since these are of limited value anyway.
Change-Id: Iaf4d6b0c738e2f84b01b8a37e6eb1e4c093e2687
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
diff --git a/arch/arm/mach-msm/clock-local.c b/arch/arm/mach-msm/clock-local.c
index 02e103d..b5ae4ab 100644
--- a/arch/arm/mach-msm/clock-local.c
+++ b/arch/arm/mach-msm/clock-local.c
@@ -610,10 +610,8 @@
ns_val = readl_relaxed(clk->ns_reg) & ns_mask;
for (freq = clk->freq_tbl; freq->freq_hz != FREQ_END; freq++) {
if ((freq->ns_val & ns_mask) == ns_val &&
- (!freq->md_val || freq->md_val == md_val)) {
- pr_info("%s rate=%d\n", clk->c.dbg_name, freq->freq_hz);
+ (!freq->md_val || freq->md_val == md_val))
break;
- }
}
if (freq->freq_hz == FREQ_END)
return HANDOFF_UNKNOWN_RATE;
diff --git a/arch/arm/mach-msm/clock-local2.c b/arch/arm/mach-msm/clock-local2.c
index c84cfb8..f9abeef 100644
--- a/arch/arm/mach-msm/clock-local2.c
+++ b/arch/arm/mach-msm/clock-local2.c
@@ -282,7 +282,6 @@
if (freq->d_val != d_regval)
continue;
}
- pr_info("%s rate=%lu\n", rcg->c.dbg_name, freq->freq_hz);
break;
}
@@ -448,7 +447,6 @@
cbcr_regval = readl_relaxed(CBCR_REG(branch));
if ((cbcr_regval & CBCR_BRANCH_OFF_BIT))
return HANDOFF_DISABLED_CLK;
- pr_info("%s enabled.\n", branch->c.dbg_name);
if (branch->parent) {
if (branch->parent->ops->handoff)
@@ -546,7 +544,6 @@
vote_regval = readl_relaxed(VOTE_REG(vclk));
if (!(vote_regval & vclk->en_mask))
return HANDOFF_DISABLED_CLK;
- pr_info("%s enabled.\n", vclk->c.dbg_name);
return HANDOFF_ENABLED_CLK;
}
diff --git a/arch/arm/mach-msm/clock.c b/arch/arm/mach-msm/clock.c
index cbc9fba..8bf98fa 100644
--- a/arch/arm/mach-msm/clock.c
+++ b/arch/arm/mach-msm/clock.c
@@ -423,6 +423,7 @@
{
enum handoff ret;
struct handoff_clk *h;
+ unsigned long rate;
int err = 0;
/*
@@ -454,6 +455,9 @@
err = clk_prepare_enable(clk);
if (err)
goto out;
+ rate = clk_get_rate(clk);
+ if (rate)
+ pr_debug("%s rate=%lu\n", clk->dbg_name, rate);
h->clk = clk;
list_add_tail(&h->list, &handoff_list);
}