Lines Matching full:optee

40 	struct optee *optee = tee_get_drvdata(ctx->teedev);  in handle_rpc_func_cmd_i2c_transfer()  local
65 if (optee->ops->from_msg_param(optee, params, arg->num_params, in handle_rpc_func_cmd_i2c_transfer()
109 if (optee->ops->to_msg_param(optee, arg->params, in handle_rpc_func_cmd_i2c_transfer()
131 static void handle_rpc_func_cmd_wq(struct optee *optee, in handle_rpc_func_cmd_wq() argument
145 rc = optee_notif_wait(optee, arg->params[0].u.value.b, arg->params[0].u.value.c); in handle_rpc_func_cmd_wq()
150 if (optee_notif_send(optee, arg->params[0].u.value.b)) in handle_rpc_func_cmd_wq()
188 static void handle_rpc_supp_cmd(struct tee_context *ctx, struct optee *optee, in handle_rpc_supp_cmd() argument
202 if (optee->ops->from_msg_param(optee, params, arg->num_params, in handle_rpc_supp_cmd()
210 if (optee->ops->to_msg_param(optee, arg->params, arg->num_params, in handle_rpc_supp_cmd()
221 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_rpc_cmd_alloc_suppl() local
233 mutex_lock(&optee->supp.mutex); in optee_rpc_cmd_alloc_suppl()
235 shm = tee_shm_get_from_id(optee->supp.ctx, param.u.value.c); in optee_rpc_cmd_alloc_suppl()
236 mutex_unlock(&optee->supp.mutex); in optee_rpc_cmd_alloc_suppl()
266 struct optee *optee, in handle_rpc_func_rpmb_probe_reset() argument
272 optee->ops->from_msg_param(optee, params, arg->num_params, in handle_rpc_func_rpmb_probe_reset()
282 if (optee->ops->to_msg_param(optee, arg->params, in handle_rpc_func_rpmb_probe_reset()
288 mutex_lock(&optee->rpmb_dev_mutex); in handle_rpc_func_rpmb_probe_reset()
289 rpmb_dev_put(optee->rpmb_dev); in handle_rpc_func_rpmb_probe_reset()
290 optee->rpmb_dev = NULL; in handle_rpc_func_rpmb_probe_reset()
291 mutex_unlock(&optee->rpmb_dev_mutex); in handle_rpc_func_rpmb_probe_reset()
318 struct optee *optee, in handle_rpc_func_rpmb_probe_next() argument
326 optee->ops->from_msg_param(optee, params, arg->num_params, in handle_rpc_func_rpmb_probe_next()
340 mutex_lock(&optee->rpmb_dev_mutex); in handle_rpc_func_rpmb_probe_next()
341 rdev = rpmb_dev_find_device(NULL, optee->rpmb_dev, rpc_rpmb_match); in handle_rpc_func_rpmb_probe_next()
342 rpmb_dev_put(optee->rpmb_dev); in handle_rpc_func_rpmb_probe_next()
343 optee->rpmb_dev = rdev; in handle_rpc_func_rpmb_probe_next()
344 mutex_unlock(&optee->rpmb_dev_mutex); in handle_rpc_func_rpmb_probe_next()
360 if (optee->ops->to_msg_param(optee, arg->params, in handle_rpc_func_rpmb_probe_next()
370 struct optee *optee, in handle_rpc_func_rpmb_frames() argument
377 mutex_lock(&optee->rpmb_dev_mutex); in handle_rpc_func_rpmb_frames()
378 rdev = rpmb_dev_get(optee->rpmb_dev); in handle_rpc_func_rpmb_frames()
379 mutex_unlock(&optee->rpmb_dev_mutex); in handle_rpc_func_rpmb_frames()
386 optee->ops->from_msg_param(optee, params, arg->num_params, in handle_rpc_func_rpmb_frames()
403 if (optee->ops->to_msg_param(optee, arg->params, in handle_rpc_func_rpmb_frames()
413 void optee_rpc_cmd(struct tee_context *ctx, struct optee *optee, in optee_rpc_cmd() argument
421 handle_rpc_func_cmd_wq(optee, arg); in optee_rpc_cmd()
430 * optee->in_kernel_rpmb_routing true means that OP-TEE supports in optee_rpc_cmd()
440 if (optee->in_kernel_rpmb_routing) in optee_rpc_cmd()
441 handle_rpc_func_rpmb_probe_reset(ctx, optee, arg); in optee_rpc_cmd()
443 handle_rpc_supp_cmd(ctx, optee, arg); in optee_rpc_cmd()
446 if (optee->in_kernel_rpmb_routing) in optee_rpc_cmd()
447 handle_rpc_func_rpmb_probe_next(ctx, optee, arg); in optee_rpc_cmd()
449 handle_rpc_supp_cmd(ctx, optee, arg); in optee_rpc_cmd()
452 if (optee->in_kernel_rpmb_routing) in optee_rpc_cmd()
453 handle_rpc_func_rpmb_frames(ctx, optee, arg); in optee_rpc_cmd()
455 handle_rpc_supp_cmd(ctx, optee, arg); in optee_rpc_cmd()
458 handle_rpc_supp_cmd(ctx, optee, arg); in optee_rpc_cmd()