summaryrefslogtreecommitdiff
path: root/include/psci.h
diff options
context:
space:
mode:
authorachingupta <achin.gupta@arm.com>2014-05-01 13:16:33 +0100
committerachingupta <achin.gupta@arm.com>2014-05-01 13:16:33 +0100
commitb495bdef190acf166c713e138b61c5bb25402fc0 (patch)
treede6341f67ab68096d46043febd87966cf0f975ed /include/psci.h
parent429421de8297172e43b507b732e1cd6be06dfc21 (diff)
parent759ec93b6916dccca3e445e20b3bd2e20d1117d0 (diff)
Merge pull request #50 from vikramkanigiri/vk/tf-issues#26
Preserve PSCI cpu_suspend 'power_state' parameter.
Diffstat (limited to 'include/psci.h')
-rw-r--r--include/psci.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/psci.h b/include/psci.h
index 5c66789e..e2907937 100644
--- a/include/psci.h
+++ b/include/psci.h
@@ -73,6 +73,7 @@
#define PSTATE_ID_MASK 0xffff
#define PSTATE_TYPE_MASK 0x1
#define PSTATE_AFF_LVL_MASK 0x3
+#define PSTATE_VALID_MASK 0xFCFE0000
#define PSTATE_TYPE_STANDBY 0x0
#define PSTATE_TYPE_POWERDOWN 0x1
@@ -118,9 +119,14 @@
#define PSCI_STATE_ON_PENDING 0x2
#define PSCI_STATE_SUSPEND 0x3
+#define PSCI_INVALID_DATA -1
+
#define get_phys_state(x) (x != PSCI_STATE_ON ? \
PSCI_STATE_OFF : PSCI_STATE_ON)
+#define psci_validate_power_state(pstate) (pstate & PSTATE_VALID_MASK)
+
+
/* Number of affinity instances whose state this psci imp. can track */
#define PSCI_NUM_AFFS 32ull
@@ -182,6 +188,9 @@ extern int psci_cpu_on(unsigned long,
extern void psci_aff_on_finish_entry(void);
extern void psci_aff_suspend_finish_entry(void);
extern void psci_register_spd_pm_hook(const spd_pm_ops *);
+extern int psci_get_suspend_stateid(unsigned long mpidr);
+extern int psci_get_suspend_afflvl(unsigned long mpidr);
+
#endif /*__ASSEMBLY__*/