Lines Matching full:mb
218 struct tegra_hsp_mailbox *mb = &hsp->mailboxes[bit]; in tegra_hsp_shared_irq() local
220 if (mb->producer) { in tegra_hsp_shared_irq()
230 hsp->mask &= ~BIT(HSP_INT_EMPTY_SHIFT + mb->index); in tegra_hsp_shared_irq()
236 mbox_chan_txdone(mb->channel.chan, 0); in tegra_hsp_shared_irq()
244 struct tegra_hsp_mailbox *mb = &hsp->mailboxes[bit]; in tegra_hsp_shared_irq() local
246 if (!mb->producer) { in tegra_hsp_shared_irq()
247 value = tegra_hsp_channel_readl(&mb->channel, in tegra_hsp_shared_irq()
251 mbox_chan_received_data(mb->channel.chan, msg); in tegra_hsp_shared_irq()
262 tegra_hsp_channel_writel(&mb->channel, 0x0, in tegra_hsp_shared_irq()
375 struct tegra_hsp_mailbox *mb = chan->con_priv; in tegra_hsp_mailbox_send_data() local
376 struct tegra_hsp *hsp = mb->channel.hsp; in tegra_hsp_mailbox_send_data()
380 if (WARN_ON(!mb->producer)) in tegra_hsp_mailbox_send_data()
387 tegra_hsp_channel_writel(&mb->channel, value, HSP_SM_SHRD_MBOX); in tegra_hsp_mailbox_send_data()
392 hsp->mask |= BIT(HSP_INT_EMPTY_SHIFT + mb->index); in tegra_hsp_mailbox_send_data()
403 struct tegra_hsp_mailbox *mb = chan->con_priv; in tegra_hsp_mailbox_flush() local
404 struct tegra_hsp_channel *ch = &mb->channel; in tegra_hsp_mailbox_flush()
424 struct tegra_hsp_mailbox *mb = chan->con_priv; in tegra_hsp_mailbox_startup() local
425 struct tegra_hsp_channel *ch = &mb->channel; in tegra_hsp_mailbox_startup()
426 struct tegra_hsp *hsp = mb->channel.hsp; in tegra_hsp_mailbox_startup()
444 if (mb->producer) in tegra_hsp_mailbox_startup()
445 hsp->mask &= ~BIT(HSP_INT_EMPTY_SHIFT + mb->index); in tegra_hsp_mailbox_startup()
447 hsp->mask |= BIT(HSP_INT_FULL_SHIFT + mb->index); in tegra_hsp_mailbox_startup()
454 if (mb->producer) in tegra_hsp_mailbox_startup()
467 struct tegra_hsp_mailbox *mb = chan->con_priv; in tegra_hsp_mailbox_shutdown() local
468 struct tegra_hsp_channel *ch = &mb->channel; in tegra_hsp_mailbox_shutdown()
469 struct tegra_hsp *hsp = mb->channel.hsp; in tegra_hsp_mailbox_shutdown()
473 if (mb->producer) in tegra_hsp_mailbox_shutdown()
483 if (mb->producer) in tegra_hsp_mailbox_shutdown()
484 hsp->mask &= ~BIT(HSP_INT_EMPTY_SHIFT + mb->index); in tegra_hsp_mailbox_shutdown()
486 hsp->mask &= ~BIT(HSP_INT_FULL_SHIFT + mb->index); in tegra_hsp_mailbox_shutdown()
544 struct tegra_hsp_mailbox *mb; in tegra_hsp_sm_xlate() local
552 mb = &hsp->mailboxes[index]; in tegra_hsp_sm_xlate()
555 mb->producer = false; in tegra_hsp_sm_xlate()
557 mb->producer = true; in tegra_hsp_sm_xlate()
559 return mb->channel.chan; in tegra_hsp_sm_xlate()
589 struct tegra_hsp_mailbox *mb = &hsp->mailboxes[i]; in tegra_hsp_add_mailboxes() local
591 mb->index = i; in tegra_hsp_add_mailboxes()
593 mb->channel.hsp = hsp; in tegra_hsp_add_mailboxes()
594 mb->channel.regs = hsp->regs + SZ_64K + i * SZ_32K; in tegra_hsp_add_mailboxes()
595 mb->channel.chan = &hsp->mbox_sm.chans[i]; in tegra_hsp_add_mailboxes()
596 mb->channel.chan->con_priv = mb; in tegra_hsp_add_mailboxes()
794 struct tegra_hsp_mailbox *mb = &hsp->mailboxes[i]; in tegra_hsp_resume() local
796 if (mb->channel.chan->cl) in tegra_hsp_resume()
797 tegra_hsp_mailbox_startup(mb->channel.chan); in tegra_hsp_resume()