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

Commit 5204c22a authored by Maulik Shah's avatar Maulik Shah
Browse files

lpm-levels: Print enabled clocks during system suspend



Print the clocks which are enabled during system suspend.
This debug information is useful to know which are the
clocks that are enabled and preventing the system levels
LPMs(XO and Vmin).

Change-Id: I8c5f88c64ab82b07a0b4175248b87afc99650a30
Signed-off-by: default avatarMaulik Shah <mkshah@codeaurora.org>
parent 5ebcda44
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
 */

struct clk_hw;
struct clk_core;

#if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK)
struct clk *__of_clk_get_from_provider(struct of_phandle_args *clkspec,
@@ -53,4 +54,5 @@ static struct clk_hw *__clk_get_hw(struct clk *clk)
	return (struct clk_hw *)clk;
}

void clock_debug_print_enabled(void) {}
#endif
+10 −7
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
#include <asm/cpuidle.h>
#include "lpm-levels.h"
#include <trace/events/power.h>
#include "../clk/clk.h"
#define CREATE_TRACE_POINTS
#include <trace/events/trace_msm_low_power.h>

@@ -1044,6 +1045,15 @@ static int cluster_configure(struct lpm_cluster *cluster, int idx,
	}

	if (level->notify_rpm) {
		/*
		 * Print the clocks which are enabled during system suspend
		 * This debug information is useful to know which are the
		 * clocks that are enabled and preventing the system level
		 * LPMs(XO and Vmin).
		 */
		if (!from_idle)
			clock_debug_print_enabled();

		cpu = get_next_online_cpu(from_idle);
		cpumask_copy(&cpumask, cpumask_of(cpu));
		clear_predict_history();
@@ -1618,13 +1628,6 @@ static int lpm_suspend_enter(suspend_state_t state)
	cpu_prepare(lpm_cpu, idx, false);
	cluster_prepare(cluster, cpumask, idx, false, 0);

	/*
	 * Print the clocks which are enabled during system suspend
	 * This debug information is useful to know which are the
	 * clocks that are enabled and preventing the system level
	 * LPMs(XO and Vmin).
	 */

	psci_enter_sleep(lpm_cpu, idx, false);

	cluster_unprepare(cluster, cpumask, idx, false, 0);