Commit 0b3a4e41 authored by Filip Drazic's avatar Filip Drazic Committed by Siva Durga Prasad Paladugu
Browse files

zynqmp: pm: Decode start address related SMC arguments for pm_req_wakeup



The pm_req_wakeup PM API accepts start address (64-bit unsiged integer)
and a flag stating if address should be used. To save an argument
of the SMC call, flag is encoded in the LSB of the address, since
addresses are word aligned.
Decode start address and use-address flag in the PM SMC handler and
pass them to pm_req_wakeup.
Signed-off-by: default avatarFilip Drazic <filip.drazic@aggios.com>
Acked-by: default avatarWill Wong <willw@xilinx.com>
parent 9feba2e7
...@@ -117,9 +117,16 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3, ...@@ -117,9 +117,16 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3,
SMC_RET1(handle, (uint64_t)ret); SMC_RET1(handle, (uint64_t)ret);
case PM_REQ_WAKEUP: case PM_REQ_WAKEUP:
ret = pm_req_wakeup(pm_arg[0], pm_arg[1], pm_arg[2], {
/* Use address flag is encoded in the 1st bit of the low-word */
unsigned int set_addr = pm_arg[1] & 0x1;
uint64_t address = (uint64_t)pm_arg[2] << 32;
address |= pm_arg[1] & (~0x1);
ret = pm_req_wakeup(pm_arg[0], set_addr, address,
pm_arg[3]); pm_arg[3]);
SMC_RET1(handle, (uint64_t)ret); SMC_RET1(handle, (uint64_t)ret);
}
case PM_FORCE_POWERDOWN: case PM_FORCE_POWERDOWN:
ret = pm_force_powerdown(pm_arg[0], pm_arg[1]); ret = pm_force_powerdown(pm_arg[0], pm_arg[1]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment