Lines Matching refs:mhu
53 struct arm_mhu *mhu; member
78 void __iomem *base = chan_info->mhu->mlink[chan_info->pchan].rx_reg; in mhu_db_mbox_clear_irq()
83 static unsigned int mhu_db_mbox_irq_to_pchan_num(struct arm_mhu *mhu, int irq) in mhu_db_mbox_irq_to_pchan_num() argument
88 if (mhu->mlink[pchan].irq == irq) in mhu_db_mbox_irq_to_pchan_num()
94 mhu_db_mbox_irq_to_channel(struct arm_mhu *mhu, unsigned int pchan) in mhu_db_mbox_irq_to_channel() argument
99 struct mbox_controller *mbox = &mhu->mbox; in mhu_db_mbox_irq_to_channel()
100 void __iomem *base = mhu->mlink[pchan].rx_reg; in mhu_db_mbox_irq_to_channel()
126 struct arm_mhu *mhu = data; in mhu_db_mbox_rx_handler() local
127 unsigned int pchan = mhu_db_mbox_irq_to_pchan_num(mhu, irq); in mhu_db_mbox_rx_handler()
129 while (NULL != (chan = mhu_db_mbox_irq_to_channel(mhu, pchan))) { in mhu_db_mbox_rx_handler()
140 void __iomem *base = chan_info->mhu->mlink[chan_info->pchan].tx_reg; in mhu_db_last_tx_done()
151 void __iomem *base = chan_info->mhu->mlink[chan_info->pchan].tx_reg; in mhu_db_send_data()
168 struct mbox_controller *mbox = &chan_info->mhu->mbox; in mhu_db_shutdown()
189 struct arm_mhu *mhu = dev_get_drvdata(mbox->dev); in mhu_db_mbox_xlate() local
228 chan_info->mhu = mhu; in mhu_db_mbox_xlate()
251 struct arm_mhu *mhu; in mhu_db_probe() local
275 mhu = devm_kzalloc(dev, sizeof(*mhu), GFP_KERNEL); in mhu_db_probe()
276 if (!mhu) in mhu_db_probe()
279 mhu->base = devm_ioremap_resource(dev, &adev->res); in mhu_db_probe()
280 if (IS_ERR(mhu->base)) in mhu_db_probe()
281 return PTR_ERR(mhu->base); in mhu_db_probe()
287 mhu->dev = dev; in mhu_db_probe()
288 mhu->mbox.dev = dev; in mhu_db_probe()
289 mhu->mbox.chans = chans; in mhu_db_probe()
290 mhu->mbox.num_chans = max_chans; in mhu_db_probe()
291 mhu->mbox.txdone_irq = false; in mhu_db_probe()
292 mhu->mbox.txdone_poll = true; in mhu_db_probe()
293 mhu->mbox.txpoll_period = 1; in mhu_db_probe()
295 mhu->mbox.of_xlate = mhu_db_mbox_xlate; in mhu_db_probe()
296 amba_set_drvdata(adev, mhu); in mhu_db_probe()
298 mhu->mbox.ops = &mhu_db_ops; in mhu_db_probe()
300 err = devm_mbox_controller_register(dev, &mhu->mbox); in mhu_db_probe()
307 int irq = mhu->mlink[i].irq = adev->irq[i]; in mhu_db_probe()
314 mhu->mlink[i].rx_reg = mhu->base + mhu_reg[i]; in mhu_db_probe()
315 mhu->mlink[i].tx_reg = mhu->mlink[i].rx_reg + TX_REG_OFFSET; in mhu_db_probe()
319 IRQF_ONESHOT, "mhu_db_link", mhu); in mhu_db_probe()
322 mbox_controller_unregister(&mhu->mbox); in mhu_db_probe()