diff options
author | danh-arm <dan.handley@arm.com> | 2015-07-02 16:17:11 +0100 |
---|---|---|
committer | danh-arm <dan.handley@arm.com> | 2015-07-02 16:17:11 +0100 |
commit | 484bb38509e8822d8b1fde93e215eb0e7abdf86d (patch) | |
tree | ab25d99acfee60e934a6324f01a80483b83f2b1b /include/bl31/services/psci.h | |
parent | 1ea5233f34fab1fca85dd60e180b7468ecbcbadf (diff) | |
parent | c0aff0e0b43dc24cbce889c38e3e22e92b2d6bf2 (diff) |
Merge pull request #324 from soby-mathew/sm/sys_suspend
PSCI: Add SYSTEM_SUSPEND API support
Diffstat (limited to 'include/bl31/services/psci.h')
-rw-r--r-- | include/bl31/services/psci.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/bl31/services/psci.h b/include/bl31/services/psci.h index 80bc53b8..dd1891c6 100644 --- a/include/bl31/services/psci.h +++ b/include/bl31/services/psci.h @@ -62,6 +62,8 @@ #define PSCI_SYSTEM_OFF 0x84000008 #define PSCI_SYSTEM_RESET 0x84000009 #define PSCI_FEATURES 0x8400000A +#define PSCI_SYSTEM_SUSPEND_AARCH32 0x8400000E +#define PSCI_SYSTEM_SUSPEND_AARCH64 0xc400000E /* Macro to help build the psci capabilities bitfield */ #define define_psci_cap(x) (1 << (x & 0x1f)) @@ -69,7 +71,7 @@ /* * Number of PSCI calls (above) implemented */ -#define PSCI_NUM_CALLS 16 +#define PSCI_NUM_CALLS 18 /******************************************************************************* * PSCI Migrate and friends @@ -93,12 +95,16 @@ #define PSTATE_TYPE_STANDBY 0x0 #define PSTATE_TYPE_POWERDOWN 0x1 -#define psci_get_pstate_id(pstate) ((pstate >> PSTATE_ID_SHIFT) & \ +#define psci_get_pstate_id(pstate) (((pstate) >> PSTATE_ID_SHIFT) & \ PSTATE_ID_MASK) -#define psci_get_pstate_type(pstate) ((pstate >> PSTATE_TYPE_SHIFT) & \ +#define psci_get_pstate_type(pstate) (((pstate) >> PSTATE_TYPE_SHIFT) & \ PSTATE_TYPE_MASK) -#define psci_get_pstate_afflvl(pstate) ((pstate >> PSTATE_AFF_LVL_SHIFT) & \ +#define psci_get_pstate_afflvl(pstate) (((pstate) >> PSTATE_AFF_LVL_SHIFT) & \ PSTATE_AFF_LVL_MASK) +#define psci_make_powerstate(state_id, type, afflvl) \ + (((state_id) & PSTATE_ID_MASK) << PSTATE_ID_SHIFT) |\ + (((type) & PSTATE_TYPE_MASK) << PSTATE_TYPE_SHIFT) |\ + (((afflvl) & PSTATE_AFF_LVL_MASK) << PSTATE_AFF_LVL_SHIFT) /******************************************************************************* * PSCI CPU_FEATURES feature flag specific defines @@ -193,6 +199,7 @@ typedef struct plat_pm_ops { void (*system_reset)(void) __dead2; int (*validate_power_state)(unsigned int power_state); int (*validate_ns_entrypoint)(unsigned long ns_entrypoint); + unsigned int (*get_sys_suspend_power_state)(void); } plat_pm_ops_t; /******************************************************************************* |