aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-04-27 17:10:18 -0400
committerMike Turquette <mturquette@linaro.org>2013-04-28 02:03:43 -0400
commit1e435256d625c203660f0105f1155cd2af283051 (patch)
treee3ec1f0d91aaaf7f7a559e2ed11937edcd6321f2 /drivers/clk/clk.c
parentc700835bf8568f9c183c9b6aa7794d29266da15b (diff)
clk: add clk_ignore_unused option to keep boot clocks on
This is primarily useful when there's a driver that doesn't claim clocks properly, but the bootloader leaves them on. It's not expected to be used in normal cases, but for bringup and debug it's very useful to have the option to not gate unclaimed clocks that are still on. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Mike Turquette <mturquette@linaro.org> [mturquette@linaro.org: fixed up trivial merge issue]
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 20ce67f82d65..934cfd18f72d 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -499,10 +499,23 @@ out:
499 return; 499 return;
500} 500}
501 501
502static bool clk_ignore_unused;
503static int __init clk_ignore_unused_setup(char *__unused)
504{
505 clk_ignore_unused = true;
506 return 1;
507}
508__setup("clk_ignore_unused", clk_ignore_unused_setup);
509
502static int clk_disable_unused(void) 510static int clk_disable_unused(void)
503{ 511{
504 struct clk *clk; 512 struct clk *clk;
505 513
514 if (clk_ignore_unused) {
515 pr_warn("clk: Not disabling unused clocks\n");
516 return 0;
517 }
518
506 clk_prepare_lock(); 519 clk_prepare_lock();
507 520
508 hlist_for_each_entry(clk, &clk_root_list, child_node) 521 hlist_for_each_entry(clk, &clk_root_list, child_node)