diff options
author | Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> | 2018-04-30 19:39:49 +0530 |
---|---|---|
committer | Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> | 2018-05-17 15:18:42 +0530 |
commit | 3d512f0b32b6d0835b66d46b4bb16f206fb68be4 (patch) | |
tree | fb0fa716c9842a9589f08f31194b66c7c6aa2f84 | |
parent | 756e7f282510d7111c67d2f793b09fadf33e7d80 (diff) |
zynqmp: pm: Reverse logic for detecting that the PMU firmware is loaded
Use positive logic (pm_up instead of pm_down) to check whether PMU
services are available. This change also puts the variable into the
BSS section rather than the Data section as the variable is now
initialized to 0 rather than 1.
Signed-off-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Stefan Krsmanovic <stefan.krsmanovic@aggios.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
-rw-r--r-- | plat/xilinx/zynqmp/pm_service/pm_svc_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plat/xilinx/zynqmp/pm_service/pm_svc_main.c b/plat/xilinx/zynqmp/pm_service/pm_svc_main.c index 84bd887a..bca2c409 100644 --- a/plat/xilinx/zynqmp/pm_service/pm_svc_main.c +++ b/plat/xilinx/zynqmp/pm_service/pm_svc_main.c @@ -22,8 +22,8 @@ #define PM_SET_SUSPEND_MODE 0xa02 #define PM_GET_TRUSTZONE_VERSION 0xa03 -/* 0 - UP, !0 - DOWN */ -static int32_t pm_down = !0; +/* !0 - UP, 0 - DOWN */ +static int32_t pm_up = 0; /** * pm_context - Structure which contains data for power management @@ -67,7 +67,7 @@ int pm_setup(void) ret = status; } - pm_down = status; + pm_up = !status; return ret; } @@ -96,7 +96,7 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3, uint32_t pm_arg[4]; /* Handle case where PM wasn't initialized properly */ - if (pm_down) + if (!pm_up) SMC_RET1(handle, SMC_UNK); pm_arg[0] = (uint32_t)x1; |