Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1aa6575a authored by Shefali Jain's avatar Shefali Jain Committed by David Collins
Browse files

clk: Add support to print parent clock names during suspend



When debug_suspend is set to true and the low power code invokes
the function to print the enabled clocks, add support to print
enabled clock names along with their parent names if the
parent_print flag value is set, otherwise print the enabled
clocks only.

Change-Id: I4566f03cc11f323b27721e412f12034372a1f076
Signed-off-by: default avatarShefali Jain <shefjain@codeaurora.org>
parent 5c296134
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -2889,9 +2889,10 @@ static void clock_debug_print_enabled_clocks(struct seq_file *s)
	struct clk_core *core;
	int cnt = 0;

	clock_debug_output(s, 0, "Enabled clocks:\n");
	if (!mutex_trylock(&clk_debug_lock))
		return;

	mutex_lock(&clk_debug_lock);
	clock_debug_output(s, 0, "Enabled clocks:\n");

	hlist_for_each_entry(core, &clk_debug_list, debug_node)
		cnt += clock_debug_print_clock(core, s);
@@ -3265,13 +3266,18 @@ EXPORT_SYMBOL_GPL(clk_debugfs_add_file);

/*
 * Print the names of all enabled clocks and their parents if
 * debug_suspend is set from debugfs.
 * debug_suspend is set from debugfs along with print_parent flag set to 1.
 * Otherwise if print_parent set to 0, print only enabled clocks
 *
 */
void clock_debug_print_enabled(void)
void clock_debug_print_enabled(bool print_parent)
{
	if (likely(!debug_suspend))
		return;

	if (print_parent)
		clock_debug_print_enabled_clocks(NULL);
	else
		clock_debug_print_enabled_debug_suspend(NULL);
}
EXPORT_SYMBOL_GPL(clock_debug_print_enabled);
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ struct clk *__clk_create_clk(struct clk_hw *hw, const char *dev_id,
void __clk_free_clk(struct clk *clk);

/* Debugfs API to print the enabled clocks */
void clock_debug_print_enabled(void);
void clock_debug_print_enabled(bool print_parent);
void clk_debug_print_hw(struct clk_core *clk, struct seq_file *f);

#define WARN_CLK(core, name, cond, fmt, ...) do {		\
+1 −1
Original line number Diff line number Diff line
@@ -1052,7 +1052,7 @@ static int cluster_configure(struct lpm_cluster *cluster, int idx,
		 * LPMs(XO and Vmin).
		 */
		if (!from_idle)
			clock_debug_print_enabled();
			clock_debug_print_enabled(true);

		cpu = get_next_online_cpu(from_idle);
		cpumask_copy(&cpumask, cpumask_of(cpu));