Lines Matching refs:optee

40 	struct optee *optee = tee_get_drvdata(ctx->teedev);  in handle_rpc_func_cmd_i2c_transfer()  local
64 if (optee->ops->from_msg_param(optee, params, arg->num_params, in handle_rpc_func_cmd_i2c_transfer()
108 if (optee->ops->to_msg_param(optee, arg->params, in handle_rpc_func_cmd_i2c_transfer()
130 static void handle_rpc_func_cmd_wq(struct optee *optee, in handle_rpc_func_cmd_wq() argument
144 rc = optee_notif_wait(optee, arg->params[0].u.value.b, arg->params[0].u.value.c); in handle_rpc_func_cmd_wq()
149 if (optee_notif_send(optee, arg->params[0].u.value.b)) in handle_rpc_func_cmd_wq()
187 static void handle_rpc_supp_cmd(struct tee_context *ctx, struct optee *optee, in handle_rpc_supp_cmd() argument
200 if (optee->ops->from_msg_param(optee, params, arg->num_params, in handle_rpc_supp_cmd()
208 if (optee->ops->to_msg_param(optee, arg->params, arg->num_params, in handle_rpc_supp_cmd()
219 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_rpc_cmd_alloc_suppl() local
231 mutex_lock(&optee->supp.mutex); in optee_rpc_cmd_alloc_suppl()
233 shm = tee_shm_get_from_id(optee->supp.ctx, param.u.value.c); in optee_rpc_cmd_alloc_suppl()
234 mutex_unlock(&optee->supp.mutex); in optee_rpc_cmd_alloc_suppl()
264 struct optee *optee, in handle_rpc_func_rpmb_probe_reset() argument
270 optee->ops->from_msg_param(optee, params, arg->num_params, in handle_rpc_func_rpmb_probe_reset()
280 if (optee->ops->to_msg_param(optee, arg->params, in handle_rpc_func_rpmb_probe_reset()
286 mutex_lock(&optee->rpmb_dev_mutex); in handle_rpc_func_rpmb_probe_reset()
287 rpmb_dev_put(optee->rpmb_dev); in handle_rpc_func_rpmb_probe_reset()
288 optee->rpmb_dev = NULL; in handle_rpc_func_rpmb_probe_reset()
289 mutex_unlock(&optee->rpmb_dev_mutex); in handle_rpc_func_rpmb_probe_reset()
316 struct optee *optee, in handle_rpc_func_rpmb_probe_next() argument
324 optee->ops->from_msg_param(optee, params, arg->num_params, in handle_rpc_func_rpmb_probe_next()
338 mutex_lock(&optee->rpmb_dev_mutex); in handle_rpc_func_rpmb_probe_next()
339 rdev = rpmb_dev_find_device(NULL, optee->rpmb_dev, rpc_rpmb_match); in handle_rpc_func_rpmb_probe_next()
340 rpmb_dev_put(optee->rpmb_dev); in handle_rpc_func_rpmb_probe_next()
341 optee->rpmb_dev = rdev; in handle_rpc_func_rpmb_probe_next()
342 mutex_unlock(&optee->rpmb_dev_mutex); in handle_rpc_func_rpmb_probe_next()
358 if (optee->ops->to_msg_param(optee, arg->params, in handle_rpc_func_rpmb_probe_next()
368 struct optee *optee, in handle_rpc_func_rpmb_frames() argument
375 mutex_lock(&optee->rpmb_dev_mutex); in handle_rpc_func_rpmb_frames()
376 rdev = rpmb_dev_get(optee->rpmb_dev); in handle_rpc_func_rpmb_frames()
377 mutex_unlock(&optee->rpmb_dev_mutex); in handle_rpc_func_rpmb_frames()
384 optee->ops->from_msg_param(optee, params, arg->num_params, in handle_rpc_func_rpmb_frames()
401 if (optee->ops->to_msg_param(optee, arg->params, in handle_rpc_func_rpmb_frames()
411 void optee_rpc_cmd(struct tee_context *ctx, struct optee *optee, in optee_rpc_cmd() argument
419 handle_rpc_func_cmd_wq(optee, arg); in optee_rpc_cmd()
438 if (optee->in_kernel_rpmb_routing) in optee_rpc_cmd()
439 handle_rpc_func_rpmb_probe_reset(ctx, optee, arg); in optee_rpc_cmd()
441 handle_rpc_supp_cmd(ctx, optee, arg); in optee_rpc_cmd()
444 if (optee->in_kernel_rpmb_routing) in optee_rpc_cmd()
445 handle_rpc_func_rpmb_probe_next(ctx, optee, arg); in optee_rpc_cmd()
447 handle_rpc_supp_cmd(ctx, optee, arg); in optee_rpc_cmd()
450 if (optee->in_kernel_rpmb_routing) in optee_rpc_cmd()
451 handle_rpc_func_rpmb_frames(ctx, optee, arg); in optee_rpc_cmd()
453 handle_rpc_supp_cmd(ctx, optee, arg); in optee_rpc_cmd()
456 handle_rpc_supp_cmd(ctx, optee, arg); in optee_rpc_cmd()