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

Commit 1f048f23 authored by Murali Nalajala's avatar Murali Nalajala
Browse files

cpuidle: lpm-levels: Print enabled clocks during system suspend



Currently msm-pm driver is printing the enabled clocks during
the system suspend. After introducing the PSCI framework msm-pm
driver is not being used and can not able to know the enabled
clocks during suspend. Call an API to print the clocks from lpm
driver instead msm-pm driver.

e.g:
	echo 1 > /d/clk/debug_suspend

Change-Id: I42373c882ce0d94efc7941238bb7ea011138ed63
Signed-off-by: default avatarMurali Nalajala <mnalajal@codeaurora.org>
parent 4c47f344
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@
#include <trace/events/power.h>
#define CREATE_TRACE_POINTS
#include <trace/events/trace_msm_low_power.h>
#include "../../drivers/clk/msm/clock.h"

#define SCLK_HZ (32768)
#define SCM_HANDOFF_LOCK_ID "S:7"
@@ -1041,6 +1042,15 @@ static int lpm_suspend_enter(suspend_state_t state)
	if (idx > 0)
		update_debug_pc_event(CPU_ENTER, idx, 0xdeaffeed,
					0xdeaffeed, false);

	/*
	 * 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).
	 */
	clock_debug_print_enabled();

	if (!use_psci)
		msm_cpu_pm_enter_sleep(cluster->cpu->levels[idx].mode, false);
	else
+3 −13
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@
#include <soc/qcom/jtag.h>
#include "idle.h"
#include "pm-boot.h"
#include "../../../drivers/clk/msm/clock.h"

#define SCM_CMD_TERMINATE_PC	(0x2)
#define SCM_CMD_CORE_HOTPLUGGED (0x10)
@@ -63,10 +62,9 @@ enum {
	MSM_PM_DEBUG_SUSPEND_LIMITS = BIT(2),
	MSM_PM_DEBUG_CLOCK = BIT(3),
	MSM_PM_DEBUG_RESET_VECTOR = BIT(4),
	MSM_PM_DEBUG_IDLE_CLK = BIT(5),
	MSM_PM_DEBUG_IDLE = BIT(6),
	MSM_PM_DEBUG_IDLE_LIMITS = BIT(7),
	MSM_PM_DEBUG_HOTPLUG = BIT(8),
	MSM_PM_DEBUG_IDLE = BIT(5),
	MSM_PM_DEBUG_IDLE_LIMITS = BIT(6),
	MSM_PM_DEBUG_HOTPLUG = BIT(7),
};

enum msm_pc_count_offsets {
@@ -370,14 +368,6 @@ static bool msm_pm_power_collapse(bool from_idle)
	if (MSM_PM_DEBUG_POWER_COLLAPSE & msm_pm_debug_mask)
		pr_info("CPU%u: %s: pre power down\n", cpu, __func__);

	/* This spews a lot of messages when a core is hotplugged. This
	 * information is most useful from last core going down during
	 * power collapse
	 */
	if ((!from_idle && cpu_online(cpu))
			|| (MSM_PM_DEBUG_IDLE_CLK & msm_pm_debug_mask))
		clock_debug_print_enabled();

	if (cpu_online(cpu) && !msm_no_ramp_down_pc)
		saved_acpuclk_rate = ramp_down_last_cpu(cpu);