Lines Matching refs:mq
305 struct omap_mbox_queue *mq = in mbox_rx_work() local
310 while (kfifo_len(&mq->fifo) >= sizeof(msg)) { in mbox_rx_work()
311 len = kfifo_out(&mq->fifo, (unsigned char *)&msg, sizeof(msg)); in mbox_rx_work()
314 mbox_chan_received_data(mq->mbox->chan, (void *)msg); in mbox_rx_work()
315 spin_lock_irq(&mq->lock); in mbox_rx_work()
316 if (mq->full) { in mbox_rx_work()
317 mq->full = false; in mbox_rx_work()
318 _omap_mbox_enable_irq(mq->mbox, IRQ_RX); in mbox_rx_work()
320 spin_unlock_irq(&mq->lock); in mbox_rx_work()
336 struct omap_mbox_queue *mq = mbox->rxq; in __mbox_rx_interrupt() local
341 if (unlikely(kfifo_avail(&mq->fifo) < sizeof(msg))) { in __mbox_rx_interrupt()
343 mq->full = true; in __mbox_rx_interrupt()
349 len = kfifo_in(&mq->fifo, (unsigned char *)&msg, sizeof(msg)); in __mbox_rx_interrupt()
375 struct omap_mbox_queue *mq; in mbox_queue_alloc() local
380 mq = kzalloc(sizeof(struct omap_mbox_queue), GFP_KERNEL); in mbox_queue_alloc()
381 if (!mq) in mbox_queue_alloc()
384 spin_lock_init(&mq->lock); in mbox_queue_alloc()
386 if (kfifo_alloc(&mq->fifo, mbox_kfifo_size, GFP_KERNEL)) in mbox_queue_alloc()
389 INIT_WORK(&mq->work, work); in mbox_queue_alloc()
390 return mq; in mbox_queue_alloc()
393 kfree(mq); in mbox_queue_alloc()
406 struct omap_mbox_queue *mq; in omap_mbox_startup() local
408 mq = mbox_queue_alloc(mbox, mbox_rx_work); in omap_mbox_startup()
409 if (!mq) in omap_mbox_startup()
411 mbox->rxq = mq; in omap_mbox_startup()
412 mq->mbox = mbox; in omap_mbox_startup()