linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: add option to keep boot clocks on
@ 2013-04-26 23:39 Olof Johansson
  2013-04-27  0:08 ` Randy Dunlap
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Olof Johansson @ 2013-04-26 23:39 UTC (permalink / raw)
  To: linux-arm-kernel

This is primarily useful when there's a driver that doesn't claim clocks
properly, but the bootloader does. 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>
---

Mike, this is a pretty trivial patch that I would love to see in 3.10
even though it's getting late. I'm definitely not picky about the naming
of the boot option, so feel free to change it.


-Olof

 drivers/clk/clk.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 20ce67f..b22551e 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -499,10 +499,24 @@ out:
 	return;
 }
 
+
+static bool keep_boot_clocks;
+static int __init clk_keep_boot_clocks(char *__unused)
+{
+	keep_boot_clocks = true;
+	return 1;
+}
+__setup("clk_keep_boot_clocks", clk_keep_boot_clocks);
+
 static int clk_disable_unused(void)
 {
 	struct clk *clk;
 
+	if (keep_boot_clocks) {
+		pr_warn("clk: Not disabling unused clocks\n");
+		return 0;
+	}
+
 	clk_prepare_lock();
 
 	hlist_for_each_entry(clk, &clk_root_list, child_node)
-- 
1.8.1.192.gc4361b8

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-04-28  6:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-26 23:39 [PATCH] clk: add option to keep boot clocks on Olof Johansson
2013-04-27  0:08 ` Randy Dunlap
2013-04-27  0:22   ` Olof Johansson
2013-04-27 18:17 ` Mike Turquette
2013-04-27 21:07   ` Olof Johansson
2013-04-27 21:10 ` [PATCH v2] clk: add clk_ignore_unused " Olof Johansson
2013-04-28  6:06   ` Mike Turquette

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).