Lines Matching refs:mq
309 struct omap_mbox_queue *mq = in mbox_rx_work() local
314 while (kfifo_len(&mq->fifo) >= sizeof(msg)) { in mbox_rx_work()
315 len = kfifo_out(&mq->fifo, (unsigned char *)&msg, sizeof(msg)); in mbox_rx_work()
318 mbox_chan_received_data(mq->mbox->chan, (void *)msg); in mbox_rx_work()
319 spin_lock_irq(&mq->lock); in mbox_rx_work()
320 if (mq->full) { in mbox_rx_work()
321 mq->full = false; in mbox_rx_work()
322 _omap_mbox_enable_irq(mq->mbox, IRQ_RX); in mbox_rx_work()
324 spin_unlock_irq(&mq->lock); in mbox_rx_work()
340 struct omap_mbox_queue *mq = mbox->rxq; in __mbox_rx_interrupt() local
345 if (unlikely(kfifo_avail(&mq->fifo) < sizeof(msg))) { in __mbox_rx_interrupt()
347 mq->full = true; in __mbox_rx_interrupt()
353 len = kfifo_in(&mq->fifo, (unsigned char *)&msg, sizeof(msg)); in __mbox_rx_interrupt()
379 struct omap_mbox_queue *mq; in mbox_queue_alloc() local
384 mq = kzalloc(sizeof(struct omap_mbox_queue), GFP_KERNEL); in mbox_queue_alloc()
385 if (!mq) in mbox_queue_alloc()
388 spin_lock_init(&mq->lock); in mbox_queue_alloc()
390 if (kfifo_alloc(&mq->fifo, mbox_kfifo_size, GFP_KERNEL)) in mbox_queue_alloc()
393 INIT_WORK(&mq->work, work); in mbox_queue_alloc()
394 return mq; in mbox_queue_alloc()
397 kfree(mq); in mbox_queue_alloc()
410 struct omap_mbox_queue *mq; in omap_mbox_startup() local
412 mq = mbox_queue_alloc(mbox, mbox_rx_work); in omap_mbox_startup()
413 if (!mq) in omap_mbox_startup()
415 mbox->rxq = mq; in omap_mbox_startup()
416 mq->mbox = mbox; in omap_mbox_startup()