Lines Matching refs:msgq
87 static u32 msgq_occupied(const struct bcm_vk_msgq __iomem *msgq,
92 wr_idx = readl_relaxed(&msgq->wr_idx);
93 rd_idx = readl_relaxed(&msgq->rd_idx);
99 u32 msgq_avail_space(const struct bcm_vk_msgq __iomem *msgq,
102 return (qinfo->q_size - msgq_occupied(msgq, qinfo) - 1);
410 struct bcm_vk_msgq __iomem *msgq;
422 * the msgq-info may not be available until a later time. In
427 dev_info(dev, "BAR1 msgq marker not initialized.\n");
437 "Advertised msgq %d error - max %d allowed\n",
445 /* first msgq location */
446 msgq = vk->bar[BAR_1] + msgq_off;
468 chan->msgq[j] = msgq;
469 msgq_start = readl_relaxed(&msgq->start);
470 msgq_size = readl_relaxed(&msgq->size);
471 msgq_nxt = readl_relaxed(&msgq->nxt);
472 msgq_db_offset = readl_relaxed(&msgq->db_offset);
483 readw_relaxed(&msgq->type),
484 readw_relaxed(&msgq->num),
487 readl_relaxed(&msgq->rd_idx),
488 readl_relaxed(&msgq->wr_idx),
501 msgq++;
546 struct bcm_vk_msgq __iomem *msgq;
555 msgq = chan->msgq[q_num];
557 avail = msgq_avail_space(msgq, qinfo);
600 struct bcm_vk_msgq __iomem *msgq;
618 msgq = chan->msgq[q_num];
623 avail = msgq_avail_space(msgq, qinfo);
633 avail = msgq_avail_space(msgq, qinfo);
642 wr_idx = readl_relaxed(&msgq->wr_idx);
662 writel(wr_idx, &msgq->wr_idx);
667 readl_relaxed(&msgq->num),
668 readl_relaxed(&msgq->rd_idx),
671 msgq_occupied(msgq, qinfo),
672 msgq_avail_space(msgq, qinfo),
673 readl_relaxed(&msgq->size));
782 struct bcm_vk_msgq __iomem *msgq;
803 msgq = chan->msgq[q_num];
807 rd_idx = readl_relaxed(&msgq->rd_idx);
808 wr_idx = readl_relaxed(&msgq->wr_idx);
860 writel(rd_idx, &msgq->rd_idx);
865 readl_relaxed(&msgq->num),
869 msgq_occupied(msgq, qinfo),
870 msgq_avail_space(msgq, qinfo),
871 readl_relaxed(&msgq->size));
910 wr_idx = readl(&msgq->wr_idx);
961 "Interrupt %d received when msgq not inited\n", irq);
1080 struct bcm_vk_msgq __iomem *msgq;
1120 msgq = vk->to_v_msg_chan.msgq[q_num];
1121 msgq_size = readl_relaxed(&msgq->size);
1334 /* read msgq info if ready */