Lines Matching refs:mhu
54 struct arm_mhu *mhu; member
79 void __iomem *base = chan_info->mhu->mlink[chan_info->pchan].rx_reg; in mhu_db_mbox_clear_irq()
84 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
89 if (mhu->mlink[pchan].irq == irq) in mhu_db_mbox_irq_to_pchan_num()
95 mhu_db_mbox_irq_to_channel(struct arm_mhu *mhu, unsigned int pchan) in mhu_db_mbox_irq_to_channel() argument
100 struct mbox_controller *mbox = &mhu->mbox; in mhu_db_mbox_irq_to_channel()
101 void __iomem *base = mhu->mlink[pchan].rx_reg; in mhu_db_mbox_irq_to_channel()
127 struct arm_mhu *mhu = data; in mhu_db_mbox_rx_handler() local
128 unsigned int pchan = mhu_db_mbox_irq_to_pchan_num(mhu, irq); in mhu_db_mbox_rx_handler()
130 while (NULL != (chan = mhu_db_mbox_irq_to_channel(mhu, pchan))) { in mhu_db_mbox_rx_handler()
141 void __iomem *base = chan_info->mhu->mlink[chan_info->pchan].tx_reg; in mhu_db_last_tx_done()
152 void __iomem *base = chan_info->mhu->mlink[chan_info->pchan].tx_reg; in mhu_db_send_data()
169 struct mbox_controller *mbox = &chan_info->mhu->mbox; in mhu_db_shutdown()
190 struct arm_mhu *mhu = dev_get_drvdata(mbox->dev); in mhu_db_mbox_xlate() local
229 chan_info->mhu = mhu; in mhu_db_mbox_xlate()
252 struct arm_mhu *mhu; in mhu_db_probe() local
276 mhu = devm_kzalloc(dev, sizeof(*mhu), GFP_KERNEL); in mhu_db_probe()
277 if (!mhu) in mhu_db_probe()
280 mhu->base = devm_ioremap_resource(dev, &adev->res); in mhu_db_probe()
281 if (IS_ERR(mhu->base)) in mhu_db_probe()
282 return PTR_ERR(mhu->base); in mhu_db_probe()
288 mhu->dev = dev; in mhu_db_probe()
289 mhu->mbox.dev = dev; in mhu_db_probe()
290 mhu->mbox.chans = chans; in mhu_db_probe()
291 mhu->mbox.num_chans = max_chans; in mhu_db_probe()
292 mhu->mbox.txdone_irq = false; in mhu_db_probe()
293 mhu->mbox.txdone_poll = true; in mhu_db_probe()
294 mhu->mbox.txpoll_period = 1; in mhu_db_probe()
296 mhu->mbox.of_xlate = mhu_db_mbox_xlate; in mhu_db_probe()
297 amba_set_drvdata(adev, mhu); in mhu_db_probe()
299 mhu->mbox.ops = &mhu_db_ops; in mhu_db_probe()
301 err = devm_mbox_controller_register(dev, &mhu->mbox); in mhu_db_probe()
308 int irq = mhu->mlink[i].irq = adev->irq[i]; in mhu_db_probe()
315 mhu->mlink[i].rx_reg = mhu->base + mhu_reg[i]; in mhu_db_probe()
316 mhu->mlink[i].tx_reg = mhu->mlink[i].rx_reg + TX_REG_OFFSET; in mhu_db_probe()
320 IRQF_ONESHOT, "mhu_db_link", mhu); in mhu_db_probe()
323 mbox_controller_unregister(&mhu->mbox); in mhu_db_probe()