From 1e435256d625c203660f0105f1155cd2af283051 Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Sat, 27 Apr 2013 14:10:18 -0700 Subject: 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 Signed-off-by: Mike Turquette [mturquette@linaro.org: fixed up trivial merge issue] --- drivers/clk/clk.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'drivers/clk') 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: return; } +static bool clk_ignore_unused; +static int __init clk_ignore_unused_setup(char *__unused) +{ + clk_ignore_unused = true; + return 1; +} +__setup("clk_ignore_unused", clk_ignore_unused_setup); + static int clk_disable_unused(void) { struct clk *clk; + if (clk_ignore_unused) { + pr_warn("clk: Not disabling unused clocks\n"); + return 0; + } + clk_prepare_lock(); hlist_for_each_entry(clk, &clk_root_list, child_node) -- cgit v1.2.3