Lines Matching refs:ctrl

166 	struct stratix10_svc_controller *ctrl;  member
204 static void svc_thread_cmd_data_claim(struct stratix10_svc_controller *ctrl, in svc_thread_cmd_data_claim() argument
211 reinit_completion(&ctrl->complete_status); in svc_thread_cmd_data_claim()
216 ctrl->invoke_fn(INTEL_SIP_SMC_FPGA_CONFIG_COMPLETED_WRITE, in svc_thread_cmd_data_claim()
221 complete(&ctrl->complete_status); in svc_thread_cmd_data_claim()
238 wait_for_completion_timeout(&ctrl->complete_status, timeout)); in svc_thread_cmd_data_claim()
250 static void svc_thread_cmd_config_status(struct stratix10_svc_controller *ctrl, in svc_thread_cmd_config_status() argument
274 ctrl->invoke_fn(a0, a1, a2, 0, 0, 0, 0, 0, &res); in svc_thread_cmd_config_status()
394 *ctrl = (struct stratix10_svc_controller *)data; in svc_normal_to_secure_thread() local
424 ret_fifo = kfifo_out_spinlocked(&ctrl->svc_fifo, in svc_normal_to_secure_thread()
426 &ctrl->svc_fifo_lock); in svc_normal_to_secure_thread()
437 svc_thread_cmd_data_claim(ctrl, pdata, cbdata); in svc_normal_to_secure_thread()
566 ctrl->invoke_fn(a0, a1, a2, a3, a4, a5, a6, a7, &res); in svc_normal_to_secure_thread()
594 svc_thread_cmd_data_claim(ctrl, in svc_normal_to_secure_thread()
599 svc_thread_cmd_config_status(ctrl, in svc_normal_to_secure_thread()
918 chan->ctrl->num_active_client++; in stratix10_svc_request_channel_byname()
937 chan->ctrl->num_active_client--; in stratix10_svc_free_channel()
938 module_put(chan->ctrl->dev->driver->owner); in stratix10_svc_free_channel()
968 if (!chan->ctrl->task) { in stratix10_svc_send()
969 chan->ctrl->task = in stratix10_svc_send()
971 (void *)chan->ctrl, in stratix10_svc_send()
973 if (IS_ERR(chan->ctrl->task)) { in stratix10_svc_send()
974 dev_err(chan->ctrl->dev, in stratix10_svc_send()
1020 ret = kfifo_in_spinlocked(&chan->ctrl->svc_fifo, p_data, in stratix10_svc_send()
1022 &chan->ctrl->svc_fifo_lock); in stratix10_svc_send()
1044 if (chan->ctrl->task && chan->ctrl->num_active_client <= 1) { in stratix10_svc_done()
1046 kthread_stop(chan->ctrl->task); in stratix10_svc_done()
1047 chan->ctrl->task = NULL; in stratix10_svc_done()
1068 struct gen_pool *genpool = chan->ctrl->genpool; in stratix10_svc_allocate_memory()
1071 pmem = devm_kzalloc(chan->ctrl->dev, sizeof(*pmem), GFP_KERNEL); in stratix10_svc_allocate_memory()
1106 gen_pool_free(chan->ctrl->genpool, in stratix10_svc_free_memory()
1186 chans[0].ctrl = controller; in stratix10_svc_drv_probe()
1191 chans[1].ctrl = controller; in stratix10_svc_drv_probe()
1196 chans[2].ctrl = controller; in stratix10_svc_drv_probe()
1260 struct stratix10_svc_controller *ctrl = platform_get_drvdata(pdev); in stratix10_svc_drv_remove() local
1262 of_platform_depopulate(ctrl->dev); in stratix10_svc_drv_remove()
1267 kfifo_free(&ctrl->svc_fifo); in stratix10_svc_drv_remove()
1268 if (ctrl->task) { in stratix10_svc_drv_remove()
1269 kthread_stop(ctrl->task); in stratix10_svc_drv_remove()
1270 ctrl->task = NULL; in stratix10_svc_drv_remove()
1272 if (ctrl->genpool) in stratix10_svc_drv_remove()
1273 gen_pool_destroy(ctrl->genpool); in stratix10_svc_drv_remove()
1274 list_del(&ctrl->node); in stratix10_svc_drv_remove()