Re: [RFC PATCH v15 02/11] ARM: qcom: Add Subsystem Power Manager (SPM) driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 09 2015 at 09:17 -0600, Lina Iyer wrote:

[...]

+static int qcom_pm_collapse(unsigned long int unused)
+{
+	qcom_scm_cpu_power_down(QCOM_SCM_L2_ON);

Rebase against latest SCM patches. Change to QCOM_SCM_CPU_PWR_DOWN_L2_ON.
+
+	/*
+	 * Returns here only if there was a pending interrupt and we did not
+	 * power down as a result.
+	 */
+	return -1;
+}
+
+static int qcom_cpu_standby(int cpuarg)
+{
+	spm_set_low_power_mode(PM_SLEEP_MODE_STBY);
+	cpu_do_idle();
+
+	return 0;
+}
+
+static int qcom_cpu_spc(int cpu)
+{
+	int ret;
+
+	spm_set_low_power_mode(PM_SLEEP_MODE_SPC);
+	cpu_pm_enter();
Remove this. This is now done by cpuidle driver.

+	ret = cpu_suspend(0, qcom_pm_collapse);
+	/*
+	 * ARM common code may execute WFI, and if the SPM mode is not reset,
+	 * then we may accidently do power down state.
+	 * SPM is configured to reset to do STBY, but that relies on the
+	 * SPM state machine to be executed. When an interrupt is pending as we
+	 * enter idle state, SPM would not execute its state machine, so the
+	 * SPM may remain configured to do power down state.
+	 * Reset the state back to standby.
+	 */
+	spm_set_low_power_mode(PM_SLEEP_MODE_STBY);
+	cpu_pm_exit();
And this..

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux