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

Commit a939ac13 authored by Murali Nalajala's avatar Murali Nalajala
Browse files

msm: pm: export msm_pm_collapse



Currently cpu_suspend() API takes 2 arguments as input
where one of the argument used as a suspend finisher.
Suspend finisher function takes care of handing over
the control to TZ after doing the necessary house
keeping of core states. On latest ARM based targets
cpu_suspend() API is modified and it accepts only
a single argument and suspend finisher is registered
as cpu_ops at boot time.

Change-Id: Ibbb952ff182418c30ad76c9ff0b47e432860f0e7
Signed-off-by: default avatarMurali Nalajala <mnalajal@codeaurora.org>
parent 404322a8
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -214,7 +214,7 @@ static bool msm_pm_pc_hotplug(void)
	return 0;
}

static int msm_pm_collapse(unsigned long unused)
int msm_pm_collapse(unsigned long unused)
{
	uint32_t cpu = smp_processor_id();
	enum msm_pm_l2_scm_flag flag = MSM_SCM_L2_ON;
@@ -252,6 +252,7 @@ static int msm_pm_collapse(unsigned long unused)

	return 0;
}
EXPORT_SYMBOL(msm_pm_collapse);

static bool __ref msm_pm_spm_power_collapse(
	unsigned int cpu, bool from_idle, bool notify_rpm)
@@ -282,8 +283,13 @@ static bool __ref msm_pm_spm_power_collapse(

	msm_jtag_save_state();

#ifdef CONFIG_CPU_V7
	collapsed = save_cpu_regs ?
		!cpu_suspend(0, msm_pm_collapse) : msm_pm_pc_hotplug();
#else
	collapsed = save_cpu_regs ?
		!cpu_suspend(0) : msm_pm_pc_hotplug();
#endif

	if (save_cpu_regs) {
		spin_lock(&cpu_cnt_lock);
+1 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ void __init msm_pm_set_tz_retention_flag(unsigned int flag);
void msm_pm_enable_retention(bool enable);
bool msm_pm_retention_enabled(void);
void msm_cpu_pm_enter_sleep(enum msm_pm_sleep_mode mode, bool from_idle);
int msm_pm_collapse(unsigned long unused);

#ifdef CONFIG_MSM_PM
void msm_pm_set_rpm_wakeup_irq(unsigned int irq);