Lines Matching refs:ipi_mbox

119 static void zynqmp_ipi_fw_call(struct zynqmp_ipi_mbox *ipi_mbox,  in zynqmp_ipi_fw_call()  argument
123 struct zynqmp_ipi_pdata *pdata = ipi_mbox->pdata; in zynqmp_ipi_fw_call()
127 a2 = ipi_mbox->remote_id; in zynqmp_ipi_fw_call()
148 struct zynqmp_ipi_mbox *ipi_mbox; in zynqmp_ipi_interrupt() local
159 ipi_mbox = &pdata->ipi_mboxes[i]; in zynqmp_ipi_interrupt()
160 mchan = &ipi_mbox->mchans[IPI_MB_CHNL_RX]; in zynqmp_ipi_interrupt()
161 chan = &ipi_mbox->mbox.chans[IPI_MB_CHNL_RX]; in zynqmp_ipi_interrupt()
162 zynqmp_ipi_fw_call(ipi_mbox, arg0, arg3, &res); in zynqmp_ipi_interrupt()
188 struct zynqmp_ipi_mbox *ipi_mbox = dev_get_drvdata(dev); in zynqmp_ipi_peek_data() local
194 if (WARN_ON(!ipi_mbox)) { in zynqmp_ipi_peek_data()
200 zynqmp_ipi_fw_call(ipi_mbox, arg0, 0, &res); in zynqmp_ipi_peek_data()
228 struct zynqmp_ipi_mbox *ipi_mbox = dev_get_drvdata(dev); in zynqmp_ipi_last_tx_done() local
234 if (WARN_ON(!ipi_mbox)) { in zynqmp_ipi_last_tx_done()
244 zynqmp_ipi_fw_call(ipi_mbox, arg0, 0, &res); in zynqmp_ipi_last_tx_done()
266 struct zynqmp_ipi_mbox *ipi_mbox = dev_get_drvdata(dev); in zynqmp_ipi_send_data() local
272 if (WARN_ON(!ipi_mbox)) { in zynqmp_ipi_send_data()
289 zynqmp_ipi_fw_call(ipi_mbox, arg0, 0, &res); in zynqmp_ipi_send_data()
301 zynqmp_ipi_fw_call(ipi_mbox, arg0, IPI_SMC_ACK_EIRQ_MASK, in zynqmp_ipi_send_data()
317 struct zynqmp_ipi_mbox *ipi_mbox = dev_get_drvdata(dev); in zynqmp_ipi_startup() local
329 if (!ipi_mbox->mchans[nchan_type].is_opened) { in zynqmp_ipi_startup()
331 zynqmp_ipi_fw_call(ipi_mbox, arg0, 0, &res); in zynqmp_ipi_startup()
344 zynqmp_ipi_fw_call(ipi_mbox, arg0, 0, &res); in zynqmp_ipi_startup()
359 struct zynqmp_ipi_mbox *ipi_mbox = dev_get_drvdata(dev); in zynqmp_ipi_shutdown() local
372 zynqmp_ipi_fw_call(ipi_mbox, arg0, 0, &res); in zynqmp_ipi_shutdown()
376 if (!ipi_mbox->mchans[chan_type].is_opened) { in zynqmp_ipi_shutdown()
378 zynqmp_ipi_fw_call(ipi_mbox, arg0, 0, &res); in zynqmp_ipi_shutdown()
471 static int zynqmp_ipi_mbox_probe(struct zynqmp_ipi_mbox *ipi_mbox, in zynqmp_ipi_mbox_probe() argument
482 dev = ipi_mbox->pdata->dev; in zynqmp_ipi_mbox_probe()
484 ipi_mbox->dev.parent = dev; in zynqmp_ipi_mbox_probe()
485 ipi_mbox->dev.release = NULL; in zynqmp_ipi_mbox_probe()
486 ipi_mbox->dev.of_node = node; in zynqmp_ipi_mbox_probe()
487 dev_set_name(&ipi_mbox->dev, "%s", of_node_full_name(node)); in zynqmp_ipi_mbox_probe()
488 dev_set_drvdata(&ipi_mbox->dev, ipi_mbox); in zynqmp_ipi_mbox_probe()
489 ipi_mbox->dev.release = zynqmp_ipi_mbox_dev_release; in zynqmp_ipi_mbox_probe()
490 ipi_mbox->dev.driver = &zynqmp_ipi_mbox_driver; in zynqmp_ipi_mbox_probe()
491 ret = device_register(&ipi_mbox->dev); in zynqmp_ipi_mbox_probe()
494 put_device(&ipi_mbox->dev); in zynqmp_ipi_mbox_probe()
497 mdev = &ipi_mbox->dev; in zynqmp_ipi_mbox_probe()
499 mchan = &ipi_mbox->mchans[IPI_MB_CHNL_TX]; in zynqmp_ipi_mbox_probe()
536 mchan = &ipi_mbox->mchans[IPI_MB_CHNL_RX]; in zynqmp_ipi_mbox_probe()
574 ret = of_property_read_u32(node, "xlnx,ipi-id", &ipi_mbox->remote_id); in zynqmp_ipi_mbox_probe()
580 mbox = &ipi_mbox->mbox; in zynqmp_ipi_mbox_probe()
592 chans[IPI_MB_CHNL_TX].con_priv = &ipi_mbox->mchans[IPI_MB_CHNL_TX]; in zynqmp_ipi_mbox_probe()
593 chans[IPI_MB_CHNL_RX].con_priv = &ipi_mbox->mchans[IPI_MB_CHNL_RX]; in zynqmp_ipi_mbox_probe()
594 ipi_mbox->mchans[IPI_MB_CHNL_TX].chan_type = IPI_MB_CHNL_TX; in zynqmp_ipi_mbox_probe()
595 ipi_mbox->mchans[IPI_MB_CHNL_RX].chan_type = IPI_MB_CHNL_RX; in zynqmp_ipi_mbox_probe()
613 struct zynqmp_ipi_mbox *ipi_mbox; in zynqmp_ipi_free_mboxes() local
618 ipi_mbox = &pdata->ipi_mboxes[i]; in zynqmp_ipi_free_mboxes()
619 if (ipi_mbox->dev.parent) { in zynqmp_ipi_free_mboxes()
620 mbox_controller_unregister(&ipi_mbox->mbox); in zynqmp_ipi_free_mboxes()
621 if (device_is_registered(&ipi_mbox->dev)) in zynqmp_ipi_free_mboxes()
622 device_unregister(&ipi_mbox->dev); in zynqmp_ipi_free_mboxes()