Lines Matching refs:mchan
82 struct hi6220_mbox_chan *mchan; member
111 struct hi6220_mbox_chan *mchan = chan->con_priv; in hi6220_mbox_last_tx_done() local
112 struct hi6220_mbox *mbox = mchan->parent; in hi6220_mbox_last_tx_done()
118 state = readl(mbox->base + MBOX_MODE_REG(mchan->slot)); in hi6220_mbox_last_tx_done()
124 struct hi6220_mbox_chan *mchan = chan->con_priv; in hi6220_mbox_send_data() local
125 struct hi6220_mbox *mbox = mchan->parent; in hi6220_mbox_send_data()
126 unsigned int slot = mchan->slot; in hi6220_mbox_send_data()
131 mchan->dir = MBOX_TX; in hi6220_mbox_send_data()
144 writel(BIT(mchan->dst_irq), DST_INT_RAW_REG(mbox->ipc)); in hi6220_mbox_send_data()
151 struct hi6220_mbox_chan *mchan; in hi6220_mbox_interrupt() local
174 mchan = chan->con_priv; in hi6220_mbox_interrupt()
175 if (mchan->dir == MBOX_TX) in hi6220_mbox_interrupt()
180 MBOX_DATA_REG(mchan->slot) + i * 4); in hi6220_mbox_interrupt()
186 writel(BIT(mchan->ack_irq), ACK_INT_CLR_REG(mbox->ipc)); in hi6220_mbox_interrupt()
187 mbox_set_state(mbox, mchan->slot, MBOX_STATE_IDLE); in hi6220_mbox_interrupt()
195 struct hi6220_mbox_chan *mchan = chan->con_priv; in hi6220_mbox_startup() local
196 struct hi6220_mbox *mbox = mchan->parent; in hi6220_mbox_startup()
198 mchan->dir = 0; in hi6220_mbox_startup()
201 writel(BIT(mchan->ack_irq), ACK_INT_ENA_REG(mbox->ipc)); in hi6220_mbox_startup()
207 struct hi6220_mbox_chan *mchan = chan->con_priv; in hi6220_mbox_shutdown() local
208 struct hi6220_mbox *mbox = mchan->parent; in hi6220_mbox_shutdown()
211 writel(BIT(mchan->ack_irq), ACK_INT_DIS_REG(mbox->ipc)); in hi6220_mbox_shutdown()
212 mbox->irq_map_chan[mchan->ack_irq] = NULL; in hi6220_mbox_shutdown()
226 struct hi6220_mbox_chan *mchan; in hi6220_mbox_xlate() local
248 mchan = chan->con_priv; in hi6220_mbox_xlate()
249 mchan->dst_irq = dst_irq; in hi6220_mbox_xlate()
250 mchan->ack_irq = ack_irq; in hi6220_mbox_xlate()
275 mbox->mchan = devm_kcalloc(dev, in hi6220_mbox_probe()
276 mbox->chan_num, sizeof(*mbox->mchan), GFP_KERNEL); in hi6220_mbox_probe()
277 if (!mbox->mchan) in hi6220_mbox_probe()
316 mbox->chan[i].con_priv = &mbox->mchan[i]; in hi6220_mbox_probe()
319 mbox->mchan[i].parent = mbox; in hi6220_mbox_probe()
320 mbox->mchan[i].slot = i; in hi6220_mbox_probe()