aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-10-08 13:40:20 -0400
committerPaul Walmsley <paul@pwsan.com>2010-10-08 13:40:20 -0400
commit6041c27f51f237b59ea0838c33e08223cf98e43e (patch)
tree4081099b206d531c9a441a65a709d2b574081965
parent4814ced5116e3b73dc4f63eec84999739fc8ed11 (diff)
OMAP2+: clock: reduce the amount of standard debugging while disabling unused clocks
Reduce the amount of debugging generated by default when unused clocks are being disabled by the clock code. The previous code would only generate debug-level messages, but some people who wished to run production kernels with debug-level messages enabled reported that the large number of clock disable messages were slowing boot. Now to enable clock-by-clock disable messages, DEBUG needs to be defined in mach-omap2/clock.c. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Tuukka Tikkanen <tuukka.tikkanen@nokia.com> Cc: Tim Bird <tim.bird@am.sony.com>
-rw-r--r--arch/arm/mach-omap2/clock.c2
-rw-r--r--arch/arm/plat-omap/clock.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 605f531783a8..b5babf5440e4 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -395,7 +395,7 @@ void omap2_clk_disable_unused(struct clk *clk)
395 if ((regval32 & (1 << clk->enable_bit)) == v) 395 if ((regval32 & (1 << clk->enable_bit)) == v)
396 return; 396 return;
397 397
398 printk(KERN_DEBUG "Disabling unused clock \"%s\"\n", clk->name); 398 pr_debug("Disabling unused clock \"%s\"\n", clk->name);
399 if (cpu_is_omap34xx()) { 399 if (cpu_is_omap34xx()) {
400 omap2_clk_enable(clk); 400 omap2_clk_enable(clk);
401 omap2_clk_disable(clk); 401 omap2_clk_disable(clk);
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 7190cbd92620..fc62fb5fc20b 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -60,7 +60,7 @@ void clk_disable(struct clk *clk)
60 60
61 spin_lock_irqsave(&clockfw_lock, flags); 61 spin_lock_irqsave(&clockfw_lock, flags);
62 if (clk->usecount == 0) { 62 if (clk->usecount == 0) {
63 printk(KERN_ERR "Trying disable clock %s with 0 usecount\n", 63 pr_err("Trying disable clock %s with 0 usecount\n",
64 clk->name); 64 clk->name);
65 WARN_ON(1); 65 WARN_ON(1);
66 goto out; 66 goto out;
@@ -397,6 +397,7 @@ static int __init clk_disable_unused(void)
397 struct clk *ck; 397 struct clk *ck;
398 unsigned long flags; 398 unsigned long flags;
399 399
400 pr_info("clock: disabling unused clocks to save power\n");
400 list_for_each_entry(ck, &clocks, node) { 401 list_for_each_entry(ck, &clocks, node) {
401 if (ck->ops == &clkops_null) 402 if (ck->ops == &clkops_null)
402 continue; 403 continue;
@@ -418,7 +419,7 @@ late_initcall(clk_disable_unused);
418int __init clk_init(struct clk_functions * custom_clocks) 419int __init clk_init(struct clk_functions * custom_clocks)
419{ 420{
420 if (!custom_clocks) { 421 if (!custom_clocks) {
421 printk(KERN_ERR "No custom clock functions registered\n"); 422 pr_err("No custom clock functions registered\n");
422 BUG(); 423 BUG();
423 } 424 }
424 425