Lines Matching refs:mb
220 struct tegra_hsp_mailbox *mb = &hsp->mailboxes[bit]; in tegra_hsp_shared_irq() local
222 if (mb->producer) { in tegra_hsp_shared_irq()
232 hsp->mask &= ~BIT(HSP_INT_EMPTY_SHIFT + mb->index); in tegra_hsp_shared_irq()
238 mbox_chan_txdone(mb->channel.chan, 0); in tegra_hsp_shared_irq()
246 struct tegra_hsp_mailbox *mb = &hsp->mailboxes[bit]; in tegra_hsp_shared_irq() local
248 if (!mb->producer) { in tegra_hsp_shared_irq()
249 value = tegra_hsp_channel_readl(&mb->channel, in tegra_hsp_shared_irq()
253 mbox_chan_received_data(mb->channel.chan, msg); in tegra_hsp_shared_irq()
264 tegra_hsp_channel_writel(&mb->channel, 0x0, in tegra_hsp_shared_irq()
377 struct tegra_hsp_mailbox *mb = chan->con_priv; in tegra_hsp_mailbox_send_data() local
378 struct tegra_hsp *hsp = mb->channel.hsp; in tegra_hsp_mailbox_send_data()
382 if (WARN_ON(!mb->producer)) in tegra_hsp_mailbox_send_data()
389 tegra_hsp_channel_writel(&mb->channel, value, HSP_SM_SHRD_MBOX); in tegra_hsp_mailbox_send_data()
394 hsp->mask |= BIT(HSP_INT_EMPTY_SHIFT + mb->index); in tegra_hsp_mailbox_send_data()
405 struct tegra_hsp_mailbox *mb = chan->con_priv; in tegra_hsp_mailbox_flush() local
406 struct tegra_hsp_channel *ch = &mb->channel; in tegra_hsp_mailbox_flush()
426 struct tegra_hsp_mailbox *mb = chan->con_priv; in tegra_hsp_mailbox_startup() local
427 struct tegra_hsp_channel *ch = &mb->channel; in tegra_hsp_mailbox_startup()
428 struct tegra_hsp *hsp = mb->channel.hsp; in tegra_hsp_mailbox_startup()
446 if (mb->producer) in tegra_hsp_mailbox_startup()
447 hsp->mask &= ~BIT(HSP_INT_EMPTY_SHIFT + mb->index); in tegra_hsp_mailbox_startup()
449 hsp->mask |= BIT(HSP_INT_FULL_SHIFT + mb->index); in tegra_hsp_mailbox_startup()
456 if (mb->producer) in tegra_hsp_mailbox_startup()
469 struct tegra_hsp_mailbox *mb = chan->con_priv; in tegra_hsp_mailbox_shutdown() local
470 struct tegra_hsp_channel *ch = &mb->channel; in tegra_hsp_mailbox_shutdown()
471 struct tegra_hsp *hsp = mb->channel.hsp; in tegra_hsp_mailbox_shutdown()
475 if (mb->producer) in tegra_hsp_mailbox_shutdown()
485 if (mb->producer) in tegra_hsp_mailbox_shutdown()
486 hsp->mask &= ~BIT(HSP_INT_EMPTY_SHIFT + mb->index); in tegra_hsp_mailbox_shutdown()
488 hsp->mask &= ~BIT(HSP_INT_FULL_SHIFT + mb->index); in tegra_hsp_mailbox_shutdown()
546 struct tegra_hsp_mailbox *mb; in tegra_hsp_sm_xlate() local
554 mb = &hsp->mailboxes[index]; in tegra_hsp_sm_xlate()
557 mb->producer = false; in tegra_hsp_sm_xlate()
559 mb->producer = true; in tegra_hsp_sm_xlate()
561 return mb->channel.chan; in tegra_hsp_sm_xlate()
591 struct tegra_hsp_mailbox *mb = &hsp->mailboxes[i]; in tegra_hsp_add_mailboxes() local
593 mb->index = i; in tegra_hsp_add_mailboxes()
595 mb->channel.hsp = hsp; in tegra_hsp_add_mailboxes()
596 mb->channel.regs = hsp->regs + SZ_64K + i * SZ_32K; in tegra_hsp_add_mailboxes()
597 mb->channel.chan = &hsp->mbox_sm.chans[i]; in tegra_hsp_add_mailboxes()
598 mb->channel.chan->con_priv = mb; in tegra_hsp_add_mailboxes()
808 struct tegra_hsp_mailbox *mb = &hsp->mailboxes[i]; in tegra_hsp_resume() local
810 if (mb->channel.chan->cl) in tegra_hsp_resume()
811 tegra_hsp_mailbox_startup(mb->channel.chan); in tegra_hsp_resume()