Lines Matching refs:context
78 *pcontext = &psp->ras_context.context; in set_ta_context_funcs()
154 struct ta_context *context = NULL; in ta_if_load_debugfs_write() local
183 set_ta_context_funcs(psp, ta_type, &context); in ta_if_load_debugfs_write()
195 if (!context->mem_context.shared_buf) { in ta_if_load_debugfs_write()
196 ret = psp_ta_init_shared_buf(psp, &context->mem_context); in ta_if_load_debugfs_write()
204 if (ret || context->resp_status) { in ta_if_load_debugfs_write()
207 ret, context->resp_status); in ta_if_load_debugfs_write()
214 context->ta_type = ta_type; in ta_if_load_debugfs_write()
215 context->bin_desc.fw_version = get_bin_version(ta_bin); in ta_if_load_debugfs_write()
216 context->bin_desc.size_bytes = ta_bin_len; in ta_if_load_debugfs_write()
217 context->bin_desc.start_addr = ta_bin; in ta_if_load_debugfs_write()
226 if (ret || context->resp_status) { in ta_if_load_debugfs_write()
228 ret, context->resp_status); in ta_if_load_debugfs_write()
234 if (copy_to_user((char *)buf, (void *)&context->session_id, sizeof(uint32_t))) in ta_if_load_debugfs_write()
239 if (ret && context->mem_context.shared_buf) in ta_if_load_debugfs_write()
240 psp_ta_free_shared_buf(&context->mem_context); in ta_if_load_debugfs_write()
256 struct ta_context *context = NULL; in ta_if_unload_debugfs_write() local
271 set_ta_context_funcs(psp, ta_type, &context); in ta_if_unload_debugfs_write()
272 context->session_id = ta_id; in ta_if_unload_debugfs_write()
280 if (ret || context->resp_status) { in ta_if_unload_debugfs_write()
282 ret, context->resp_status); in ta_if_unload_debugfs_write()
287 if (context->mem_context.shared_buf) in ta_if_unload_debugfs_write()
288 psp_ta_free_shared_buf(&context->mem_context); in ta_if_unload_debugfs_write()
305 struct ta_context *context = NULL; in ta_if_invoke_debugfs_write() local
338 set_ta_context_funcs(psp, ta_type, &context); in ta_if_invoke_debugfs_write()
340 if (!context || !context->initialized) { in ta_if_invoke_debugfs_write()
352 context->session_id = ta_id; in ta_if_invoke_debugfs_write()
355 ret = prep_ta_mem_context(&context->mem_context, shared_buf, shared_buf_len); in ta_if_invoke_debugfs_write()
360 if (ret || context->resp_status) { in ta_if_invoke_debugfs_write()
362 ret, context->resp_status); in ta_if_invoke_debugfs_write()
369 if (copy_to_user((char *)&buf[copy_pos], context->mem_context.shared_buf, shared_buf_len)) in ta_if_invoke_debugfs_write()