Commit 820540bf authored by Jorge Ramirez-Ortiz's avatar Jorge Ramirez-Ortiz
Browse files

opteed: pass power level on suspend



Some platforms might chose to take different actions depending on this
value; this is precisely the case for rcar-gen3.
Signed-off-by: default avatarJorge Ramirez-Ortiz <jramirez@baylibre.com>
parent 2a7c9e15
...@@ -66,6 +66,9 @@ static void opteed_cpu_suspend_handler(u_register_t max_off_pwrlvl) ...@@ -66,6 +66,9 @@ static void opteed_cpu_suspend_handler(u_register_t max_off_pwrlvl)
assert(optee_vector_table); assert(optee_vector_table);
assert(get_optee_pstate(optee_ctx->state) == OPTEE_PSTATE_ON); assert(get_optee_pstate(optee_ctx->state) == OPTEE_PSTATE_ON);
write_ctx_reg(get_gpregs_ctx(&optee_ctx->cpu_ctx), CTX_GPREG_X0,
max_off_pwrlvl);
/* Program the entry point and enter OPTEE */ /* Program the entry point and enter OPTEE */
cm_set_elr_el3(SECURE, (uint64_t) &optee_vector_table->cpu_suspend_entry); cm_set_elr_el3(SECURE, (uint64_t) &optee_vector_table->cpu_suspend_entry);
rc = opteed_synchronous_sp_entry(optee_ctx); rc = opteed_synchronous_sp_entry(optee_ctx);
......
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