Skip to content

Commit

Permalink
core: arm: sm: add psci power state macros
Browse files Browse the repository at this point in the history
Add PSCI_POWER_STATE_X macros

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
  • Loading branch information
MrVan authored and jforissier committed Sep 18, 2017
1 parent f51f270 commit b3c4f4f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/arch/arm/include/sm/psci.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@
#define PSCI_AFFINITY_LEVEL_OFF 1
#define PSCI_AFFINITY_LEVEL_ON_PENDING 2

#define PSCI_POWER_STATE_ID_MASK 0xffff
#define PSCI_POWER_STATE_ID_SHIFT 0
#define PSCI_POWER_STATE_TYPE_SHIFT 16
#define PSCI_POWER_STATE_TYPE_MASK BIT32(PSCI_POWER_STATE_TYPE_SHIFT)
#define PSCI_POWER_STATE_AFFL_SHIFT 24
#define PSCI_POWER_STATE_AFFL_MASK SHIFT_U32(0x3, \
PSCI_POWER_STATE_AFFL_SHIFT)

#define PSCI_POWER_STATE_TYPE_STANDBY 0
#define PSCI_POWER_STATE_TYPE_POWER_DOWN 1

#define PSCI_RET_SUCCESS (0)
#define PSCI_RET_NOT_SUPPORTED (-1)
#define PSCI_RET_INVALID_PARAMETERS (-2)
Expand Down

0 comments on commit b3c4f4f

Please sign in to comment.