Lines Matching full:cmdq
56 bng_re_free_hwq(rcfw->res, &rcfw->cmdq.hwq); in bng_re_free_rcfw_channel()
66 struct bng_re_cmdq_ctx *cmdq; in bng_re_alloc_fw_channel() local
70 cmdq = &rcfw->cmdq; in bng_re_alloc_fw_channel()
95 if (bng_re_alloc_init_hwq(&cmdq->hwq, &hwq_attr)) { in bng_re_alloc_fw_channel()
97 "HW channel CMDQ allocation failed\n"); in bng_re_alloc_fw_channel()
101 rcfw->crsqe_tbl = kcalloc(cmdq->hwq.max_elements, in bng_re_alloc_fw_channel()
120 struct bng_re_hwq *hwq = &rcfw->cmdq.hwq; in bng_re_process_qp_event()
137 * cmdq->lock needs to be acquired to synchronie in bng_re_process_qp_event()
150 &rcfw->cmdq.flags), in bng_re_process_qp_event()
271 wake_up_nr(&rcfw->cmdq.waitq, num_wakeup); in bng_re_service_creq()
278 struct bng_re_cmdq_ctx *cmdq; in __send_message_basic_sanity() local
280 cmdq = &rcfw->cmdq; in __send_message_basic_sanity()
282 if (test_bit(FIRMWARE_STALL_DETECTED, &cmdq->flags)) in __send_message_basic_sanity()
285 if (test_bit(FIRMWARE_INITIALIZED_FLAG, &cmdq->flags) && in __send_message_basic_sanity()
291 if (!test_bit(FIRMWARE_INITIALIZED_FLAG, &cmdq->flags) && in __send_message_basic_sanity()
308 struct bng_re_cmdq_ctx *cmdq; in __send_message() local
317 cmdq = &rcfw->cmdq; in __send_message()
318 hwq = &cmdq->hwq; in __send_message()
321 /* Cmdq are in 16-byte units, each request can consume 1 or more in __send_message()
327 cookie = cmdq->seq_num & BNG_FW_MAX_COOKIE_VALUE; in __send_message()
332 "CMDQ is full req/free %d/%d!", in __send_message()
360 /* Locate the next cmdq slot */ in __send_message()
363 /* Copy a segment of the req cmd to the cmdq */ in __send_message()
370 cmdq->seq_num++; in __send_message()
373 if (test_bit(FIRMWARE_FIRST_FLAG, &cmdq->flags)) { in __send_message()
380 clear_bit(FIRMWARE_FIRST_FLAG, &cmdq->flags); in __send_message()
382 /* ring CMDQ DB */ in __send_message()
384 writel(cmdq_prod, cmdq->cmdq_mbox.prod); in __send_message()
385 writel(BNG_FW_CMDQ_TRIG_VAL, cmdq->cmdq_mbox.db); in __send_message()
404 struct bng_re_cmdq_ctx *cmdq; in __wait_for_resp() local
407 cmdq = &rcfw->cmdq; in __wait_for_resp()
411 wait_event_timeout(cmdq->waitq, in __wait_for_resp()
463 spin_lock_bh(&rcfw->cmdq.hwq.lock); in bng_re_rcfw_send_message()
467 set_bit(FIRMWARE_STALL_DETECTED, &rcfw->cmdq.flags); in bng_re_rcfw_send_message()
468 spin_unlock_bh(&rcfw->cmdq.hwq.lock); in bng_re_rcfw_send_message()
474 dev_err(&rcfw->pdev->dev, "cmdq[%#x]=%#x status %#x\n", in bng_re_rcfw_send_message()
489 mbox = &rcfw->cmdq.cmdq_mbox; in bng_re_map_cmdq_mbox()
496 "CMDQ BAR region %d resc start is 0!\n", in bng_re_map_cmdq_mbox()
506 "CMDQ BAR region %d mapping failed\n", in bng_re_map_cmdq_mbox()
632 struct bng_re_cmdq_ctx *cmdq; in bng_re_disable_rcfw_channel() local
635 cmdq = &rcfw->cmdq; in bng_re_disable_rcfw_channel()
639 iounmap(cmdq->cmdq_mbox.reg.bar_reg); in bng_re_disable_rcfw_channel()
642 cmdq->cmdq_mbox.reg.bar_reg = NULL; in bng_re_disable_rcfw_channel()
649 struct bng_re_cmdq_ctx *cmdq; in bng_re_start_rcfw() local
654 cmdq = &rcfw->cmdq; in bng_re_start_rcfw()
656 mbox = &cmdq->cmdq_mbox; in bng_re_start_rcfw()
658 init.cmdq_pbl = cpu_to_le64(cmdq->hwq.pbl[BNG_PBL_LVL_0].pg_map_arr[0]); in bng_re_start_rcfw()
663 ((cmdq->hwq.level << in bng_re_start_rcfw()
675 struct bng_re_cmdq_ctx *cmdq; in bng_re_enable_fw_channel() local
678 cmdq = &rcfw->cmdq; in bng_re_enable_fw_channel()
681 cmdq->seq_num = 0; in bng_re_enable_fw_channel()
682 set_bit(FIRMWARE_FIRST_FLAG, &cmdq->flags); in bng_re_enable_fw_channel()
683 init_waitqueue_head(&cmdq->waitq); in bng_re_enable_fw_channel()
721 clear_bit(FIRMWARE_INITIALIZED_FLAG, &rcfw->cmdq.flags); in bng_re_deinit_rcfw()
765 set_bit(FIRMWARE_INITIALIZED_FLAG, &rcfw->cmdq.flags); in bng_re_init_rcfw()