[PATCH] clk: add debug message showing which unused clocks are disabled on boot
From: Brian Masney
Date: Thu Nov 17 2022 - 06:02:39 EST
The clk framework on bootup will automatically disable all unused clocks
on bootup unless the clk_ignore_unused kernel parameter is present.
Let's add a basic debugging log statement here that shows which clocks
are disabled. There is already tracepoint present here as well, but
there's nothing like a simple, good ol' fashioned printk for simplicity.
Signed-off-by: Brian Masney <bmasney@xxxxxxxxxx>
---
drivers/clk/clk.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 57b83665e5c3..ddf5a48e72b6 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1352,6 +1352,7 @@ static void __init clk_disable_unused_subtree(struct clk_core *core)
* back to .disable
*/
if (clk_core_is_enabled(core)) {
+ dev_dbg(core->dev, "Powering off unused clock %s\n", core->name);
trace_clk_disable(core);
if (core->ops->disable_unused)
core->ops->disable_unused(core->hw);
--
2.38.1