Lines Matching refs:hw_info

98 	hw->hw_info.share = kzalloc(size, GFP_KERNEL);  in fjes_hw_alloc_shared_status_region()
99 if (!hw->hw_info.share) in fjes_hw_alloc_shared_status_region()
102 hw->hw_info.share->epnum = hw->max_epid; in fjes_hw_alloc_shared_status_region()
109 kfree(hw->hw_info.share); in fjes_hw_free_shared_status_region()
110 hw->hw_info.share = NULL; in fjes_hw_free_shared_status_region()
212 hw->hw_info.max_epid = &hw->max_epid; in fjes_hw_setup()
213 hw->hw_info.my_epid = &hw->my_epid; in fjes_hw_setup()
223 hw->hw_info.req_buf = kzalloc(mem_size, GFP_KERNEL); in fjes_hw_setup()
224 if (!(hw->hw_info.req_buf)) in fjes_hw_setup()
227 hw->hw_info.req_buf_size = mem_size; in fjes_hw_setup()
230 hw->hw_info.res_buf = kzalloc(mem_size, GFP_KERNEL); in fjes_hw_setup()
231 if (!(hw->hw_info.res_buf)) in fjes_hw_setup()
234 hw->hw_info.res_buf_size = mem_size; in fjes_hw_setup()
240 hw->hw_info.buffer_share_bit = 0; in fjes_hw_setup()
241 hw->hw_info.buffer_unshare_reserve_bit = 0; in fjes_hw_setup()
266 param.req_len = hw->hw_info.req_buf_size; in fjes_hw_setup()
267 param.req_start = __pa(hw->hw_info.req_buf); in fjes_hw_setup()
268 param.res_len = hw->hw_info.res_buf_size; in fjes_hw_setup()
269 param.res_start = __pa(hw->hw_info.res_buf); in fjes_hw_setup()
271 param.share_start = __pa(hw->hw_info.share->ep_status); in fjes_hw_setup()
287 kfree(hw->hw_info.req_buf); in fjes_hw_cleanup()
288 hw->hw_info.req_buf = NULL; in fjes_hw_cleanup()
290 kfree(hw->hw_info.res_buf); in fjes_hw_cleanup()
291 hw->hw_info.res_buf = NULL; in fjes_hw_cleanup()
321 mutex_init(&hw->hw_info.lock); in fjes_hw_init()
332 hw->hw_info.trace = vzalloc(FJES_DEBUG_BUFFER_SIZE); in fjes_hw_init()
333 hw->hw_info.trace_size = FJES_DEBUG_BUFFER_SIZE; in fjes_hw_init()
346 mutex_lock(&hw->hw_info.lock); in fjes_hw_exit()
348 mutex_unlock(&hw->hw_info.lock); in fjes_hw_exit()
350 vfree(hw->hw_info.trace); in fjes_hw_exit()
351 hw->hw_info.trace = NULL; in fjes_hw_exit()
352 hw->hw_info.trace_size = 0; in fjes_hw_exit()
420 union fjes_device_command_req *req_buf = hw->hw_info.req_buf; in fjes_hw_request_info()
421 union fjes_device_command_res *res_buf = hw->hw_info.res_buf; in fjes_hw_request_info()
425 memset(req_buf, 0, hw->hw_info.req_buf_size); in fjes_hw_request_info()
426 memset(res_buf, 0, hw->hw_info.res_buf_size); in fjes_hw_request_info()
438 if (FJES_DEV_COMMAND_INFO_RES_LEN((*hw->hw_info.max_epid)) != in fjes_hw_request_info()
478 union fjes_device_command_req *req_buf = hw->hw_info.req_buf; in fjes_hw_register_buff_addr()
479 union fjes_device_command_res *res_buf = hw->hw_info.res_buf; in fjes_hw_register_buff_addr()
487 if (test_bit(dest_epid, &hw->hw_info.buffer_share_bit)) in fjes_hw_register_buff_addr()
490 memset(req_buf, 0, hw->hw_info.req_buf_size); in fjes_hw_register_buff_addr()
491 memset(res_buf, 0, hw->hw_info.res_buf_size); in fjes_hw_register_buff_addr()
554 set_bit(dest_epid, &hw->hw_info.buffer_share_bit); in fjes_hw_register_buff_addr()
586 union fjes_device_command_req *req_buf = hw->hw_info.req_buf; in fjes_hw_unregister_buff_addr()
587 union fjes_device_command_res *res_buf = hw->hw_info.res_buf; in fjes_hw_unregister_buff_addr()
588 struct fjes_device_shared_info *share = hw->hw_info.share; in fjes_hw_unregister_buff_addr()
599 if (!test_bit(dest_epid, &hw->hw_info.buffer_share_bit)) in fjes_hw_unregister_buff_addr()
602 memset(req_buf, 0, hw->hw_info.req_buf_size); in fjes_hw_unregister_buff_addr()
603 memset(res_buf, 0, hw->hw_info.res_buf_size); in fjes_hw_unregister_buff_addr()
644 clear_bit(dest_epid, &hw->hw_info.buffer_share_bit); in fjes_hw_unregister_buff_addr()
744 if (fjes_hw_epid_is_shared(hw->hw_info.share, epid)) { in fjes_hw_get_partner_ep_status()
781 set_bit(epidx, &hw->hw_info.buffer_unshare_reserve_bit); in fjes_hw_raise_epstop()
798 while (hw->hw_info.buffer_unshare_reserve_bit && in fjes_hw_wait_epstop()
803 status = fjes_hw_epid_is_shared(hw->hw_info.share, in fjes_hw_wait_epstop()
810 &hw->hw_info.buffer_unshare_reserve_bit)) { in fjes_hw_wait_epstop()
812 &hw->hw_info.buffer_unshare_reserve_bit); in fjes_hw_wait_epstop()
823 if (test_bit(epidx, &hw->hw_info.buffer_unshare_reserve_bit)) in fjes_hw_wait_epstop()
825 &hw->hw_info.buffer_unshare_reserve_bit); in fjes_hw_wait_epstop()
980 res_buf = hw->hw_info.res_buf; in fjes_hw_update_zone_task()
983 mutex_lock(&hw->hw_info.lock); in fjes_hw_update_zone_task()
1033 &hw->hw_info.buffer_unshare_reserve_bit); in fjes_hw_update_zone_task()
1055 mutex_unlock(&hw->hw_info.lock); in fjes_hw_update_zone_task()
1067 mutex_lock(&hw->hw_info.lock); in fjes_hw_update_zone_task()
1085 mutex_unlock(&hw->hw_info.lock); in fjes_hw_update_zone_task()
1092 mutex_lock(&hw->hw_info.lock); in fjes_hw_update_zone_task()
1110 mutex_unlock(&hw->hw_info.lock); in fjes_hw_update_zone_task()
1137 set_bit(epidx, &hw->hw_info.buffer_unshare_reserve_bit); in fjes_hw_update_zone_task()
1182 union fjes_device_command_req *req_buf = hw->hw_info.req_buf; in fjes_hw_start_debug()
1183 union fjes_device_command_res *res_buf = hw->hw_info.res_buf; in fjes_hw_start_debug()
1190 if (!hw->hw_info.trace) in fjes_hw_start_debug()
1192 memset(hw->hw_info.trace, 0, FJES_DEBUG_BUFFER_SIZE); in fjes_hw_start_debug()
1194 memset(req_buf, 0, hw->hw_info.req_buf_size); in fjes_hw_start_debug()
1195 memset(res_buf, 0, hw->hw_info.res_buf_size); in fjes_hw_start_debug()
1198 FJES_DEV_COMMAND_START_DBG_REQ_LEN(hw->hw_info.trace_size); in fjes_hw_start_debug()
1200 req_buf->start_trace.buffer_len = hw->hw_info.trace_size; in fjes_hw_start_debug()
1201 page_count = hw->hw_info.trace_size / FJES_DEBUG_PAGE_SIZE; in fjes_hw_start_debug()
1203 addr = ((u8 *)hw->hw_info.trace) + i * FJES_DEBUG_PAGE_SIZE; in fjes_hw_start_debug()
1251 union fjes_device_command_req *req_buf = hw->hw_info.req_buf; in fjes_hw_stop_debug()
1252 union fjes_device_command_res *res_buf = hw->hw_info.res_buf; in fjes_hw_stop_debug()
1256 if (!hw->hw_info.trace) in fjes_hw_stop_debug()
1259 memset(req_buf, 0, hw->hw_info.req_buf_size); in fjes_hw_stop_debug()
1260 memset(res_buf, 0, hw->hw_info.res_buf_size); in fjes_hw_stop_debug()