Lines Matching refs:msgq

87 static u32 msgq_occupied(const struct bcm_vk_msgq __iomem *msgq,  in msgq_occupied()  argument
92 wr_idx = readl_relaxed(&msgq->wr_idx); in msgq_occupied()
93 rd_idx = readl_relaxed(&msgq->rd_idx); in msgq_occupied()
99 u32 msgq_avail_space(const struct bcm_vk_msgq __iomem *msgq, in msgq_avail_space() argument
102 return (qinfo->q_size - msgq_occupied(msgq, qinfo) - 1); in msgq_avail_space()
410 struct bcm_vk_msgq __iomem *msgq; in bcm_vk_sync_msgq() local
446 msgq = vk->bar[BAR_1] + msgq_off; in bcm_vk_sync_msgq()
468 chan->msgq[j] = msgq; in bcm_vk_sync_msgq()
469 msgq_start = readl_relaxed(&msgq->start); in bcm_vk_sync_msgq()
470 msgq_size = readl_relaxed(&msgq->size); in bcm_vk_sync_msgq()
471 msgq_nxt = readl_relaxed(&msgq->nxt); in bcm_vk_sync_msgq()
472 msgq_db_offset = readl_relaxed(&msgq->db_offset); in bcm_vk_sync_msgq()
483 readw_relaxed(&msgq->type), in bcm_vk_sync_msgq()
484 readw_relaxed(&msgq->num), in bcm_vk_sync_msgq()
487 readl_relaxed(&msgq->rd_idx), in bcm_vk_sync_msgq()
488 readl_relaxed(&msgq->wr_idx), in bcm_vk_sync_msgq()
501 msgq++; in bcm_vk_sync_msgq()
546 struct bcm_vk_msgq __iomem *msgq; in bcm_vk_append_ib_sgl() local
555 msgq = chan->msgq[q_num]; in bcm_vk_append_ib_sgl()
557 avail = msgq_avail_space(msgq, qinfo); in bcm_vk_append_ib_sgl()
600 struct bcm_vk_msgq __iomem *msgq; in bcm_to_v_msg_enqueue() local
618 msgq = chan->msgq[q_num]; in bcm_to_v_msg_enqueue()
623 avail = msgq_avail_space(msgq, qinfo); in bcm_to_v_msg_enqueue()
633 avail = msgq_avail_space(msgq, qinfo); in bcm_to_v_msg_enqueue()
642 wr_idx = readl_relaxed(&msgq->wr_idx); in bcm_to_v_msg_enqueue()
662 writel(wr_idx, &msgq->wr_idx); in bcm_to_v_msg_enqueue()
667 readl_relaxed(&msgq->num), in bcm_to_v_msg_enqueue()
668 readl_relaxed(&msgq->rd_idx), in bcm_to_v_msg_enqueue()
671 msgq_occupied(msgq, qinfo), in bcm_to_v_msg_enqueue()
672 msgq_avail_space(msgq, qinfo), in bcm_to_v_msg_enqueue()
673 readl_relaxed(&msgq->size)); in bcm_to_v_msg_enqueue()
782 struct bcm_vk_msgq __iomem *msgq; in bcm_to_h_msg_dequeue() local
803 msgq = chan->msgq[q_num]; in bcm_to_h_msg_dequeue()
807 rd_idx = readl_relaxed(&msgq->rd_idx); in bcm_to_h_msg_dequeue()
808 wr_idx = readl_relaxed(&msgq->wr_idx); in bcm_to_h_msg_dequeue()
860 writel(rd_idx, &msgq->rd_idx); in bcm_to_h_msg_dequeue()
865 readl_relaxed(&msgq->num), in bcm_to_h_msg_dequeue()
869 msgq_occupied(msgq, qinfo), in bcm_to_h_msg_dequeue()
870 msgq_avail_space(msgq, qinfo), in bcm_to_h_msg_dequeue()
871 readl_relaxed(&msgq->size)); in bcm_to_h_msg_dequeue()
910 wr_idx = readl(&msgq->wr_idx); in bcm_to_h_msg_dequeue()
1080 struct bcm_vk_msgq __iomem *msgq; in bcm_vk_write() local
1120 msgq = vk->to_v_msg_chan.msgq[q_num]; in bcm_vk_write()
1121 msgq_size = readl_relaxed(&msgq->size); in bcm_vk_write()