psci_power_state_pack which combines PSCI power state information
to integer is removed by commit
c8cc427("arm64: psci: kill
psci_power_state").
In case of exynos, it needs to reconstitute PSCI power state to
support extra power mode which cpuidle does not support. To
resonstitute PSCI power state, psci_power_state_pack is added.
It will be used in psci_suspend_customized_finisher.
Change-Id: I506e690965e73cdd1d6acee7664b5cf4cfc049a0
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
__pa_symbol(cpu_resume));
}
+/**
+ * Pack PSCI power state to integer
+ *
+ * @id : indicates system power mode. 0 means non system power mode.
+ * @type : not used.
+ * @affinity_level : indicates power down scope.
+ */
+static u32 psci_power_state_pack(u32 id, u32 type, u32 affinity_level)
+{
+ return ((id << PSCI_0_2_POWER_STATE_ID_SHIFT)
+ & PSCI_0_2_POWER_STATE_ID_MASK) |
+ ((type << PSCI_0_2_POWER_STATE_TYPE_SHIFT)
+ & PSCI_0_2_POWER_STATE_TYPE_MASK) |
+ ((affinity_level << PSCI_0_2_POWER_STATE_AFFL_SHIFT)
+ & PSCI_0_2_POWER_STATE_AFFL_MASK);
+}
+
int psci_cpu_suspend_enter(unsigned long index)
{
int ret;