Merge tag 'linux-kselftest-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-highbank / pm.c
index 7f2bd85eb9350de89cb8311e5a9926830bbd9f54..40031169554813216d83c46d7f8b25c32e0d0d81 100644 (file)
 
 #include <linux/cpu_pm.h>
 #include <linux/init.h>
+#include <linux/psci.h>
 #include <linux/suspend.h>
 
 #include <asm/suspend.h>
-#include <asm/psci.h>
+
+#include <uapi/linux/psci.h>
+
+#define HIGHBANK_SUSPEND_PARAM \
+       ((0 << PSCI_0_2_POWER_STATE_ID_SHIFT) | \
+        (1 << PSCI_0_2_POWER_STATE_AFFL_SHIFT) | \
+        (PSCI_POWER_STATE_TYPE_POWER_DOWN << PSCI_0_2_POWER_STATE_TYPE_SHIFT))
 
 static int highbank_suspend_finish(unsigned long val)
 {
-       const struct psci_power_state ps = {
-               .type = PSCI_POWER_STATE_TYPE_POWER_DOWN,
-               .affinity_level = 1,
-       };
-
-       return psci_ops.cpu_suspend(ps, __pa(cpu_resume));
+       return psci_ops.cpu_suspend(HIGHBANK_SUSPEND_PARAM, __pa(cpu_resume));
 }
 
 static int highbank_pm_enter(suspend_state_t state)