Lines Matching refs:mchan

177 	struct zynqmp_ipi_mchan *mchan;  in zynqmp_ipi_interrupt()  local
188 mchan = &ipi_mbox->mchans[IPI_MB_CHNL_RX]; in zynqmp_ipi_interrupt()
193 if (mchan->is_opened) { in zynqmp_ipi_interrupt()
194 msg = mchan->rx_buf; in zynqmp_ipi_interrupt()
196 msg->len = mchan->req_buf_size; in zynqmp_ipi_interrupt()
197 memcpy_fromio(msg->data, mchan->req_buf, in zynqmp_ipi_interrupt()
227 struct zynqmp_ipi_mchan *mchan = chan->con_priv; in zynqmp_ipi_peek_data() local
241 if (mchan->chan_type == IPI_MB_CHNL_TX) { in zynqmp_ipi_peek_data()
267 struct zynqmp_ipi_mchan *mchan = chan->con_priv; in zynqmp_ipi_last_tx_done() local
277 if (mchan->chan_type == IPI_MB_CHNL_TX) { in zynqmp_ipi_last_tx_done()
305 struct zynqmp_ipi_mchan *mchan = chan->con_priv; in zynqmp_ipi_send_data() local
315 if (mchan->chan_type == IPI_MB_CHNL_TX) { in zynqmp_ipi_send_data()
317 if (msg && msg->len > mchan->req_buf_size && mchan->req_buf) { in zynqmp_ipi_send_data()
319 mchan->chan_type, (unsigned int)msg->len, in zynqmp_ipi_send_data()
320 mchan->req_buf_size); in zynqmp_ipi_send_data()
323 if (msg && msg->len && mchan->req_buf) in zynqmp_ipi_send_data()
324 memcpy_toio(mchan->req_buf, msg->data, msg->len); in zynqmp_ipi_send_data()
330 if (msg && msg->len > mchan->resp_buf_size && mchan->resp_buf) { in zynqmp_ipi_send_data()
332 mchan->chan_type, (unsigned int)msg->len, in zynqmp_ipi_send_data()
333 mchan->resp_buf_size); in zynqmp_ipi_send_data()
336 if (msg && msg->len && mchan->resp_buf) in zynqmp_ipi_send_data()
337 memcpy_toio(mchan->resp_buf, msg->data, msg->len); in zynqmp_ipi_send_data()
356 struct zynqmp_ipi_mchan *mchan = chan->con_priv; in zynqmp_ipi_startup() local
362 if (mchan->is_opened) in zynqmp_ipi_startup()
366 nchan_type = (mchan->chan_type + 1) % 2; in zynqmp_ipi_startup()
380 if (mchan->chan_type == IPI_MB_CHNL_RX) { in zynqmp_ipi_startup()
384 mchan->is_opened = 1; in zynqmp_ipi_startup()
398 struct zynqmp_ipi_mchan *mchan = chan->con_priv; in zynqmp_ipi_shutdown() local
403 if (!mchan->is_opened) in zynqmp_ipi_shutdown()
407 chan_type = mchan->chan_type; in zynqmp_ipi_shutdown()
419 mchan->is_opened = 0; in zynqmp_ipi_shutdown()
587 struct zynqmp_ipi_mchan *mchan; in zynqmp_ipi_setup() local
595 mchan = &ipi_mbox->mchans[IPI_MB_CHNL_TX]; in zynqmp_ipi_setup()
599 mchan->req_buf_size = resource_size(&res); in zynqmp_ipi_setup()
600 mchan->req_buf = devm_ioremap(mdev, res.start, in zynqmp_ipi_setup()
601 mchan->req_buf_size); in zynqmp_ipi_setup()
602 if (!mchan->req_buf) { in zynqmp_ipi_setup()
614 mchan->resp_buf_size = resource_size(&res); in zynqmp_ipi_setup()
615 mchan->resp_buf = devm_ioremap(mdev, res.start, in zynqmp_ipi_setup()
616 mchan->resp_buf_size); in zynqmp_ipi_setup()
617 if (!mchan->resp_buf) { in zynqmp_ipi_setup()
625 mchan->rx_buf = devm_kzalloc(mdev, in zynqmp_ipi_setup()
626 mchan->resp_buf_size + in zynqmp_ipi_setup()
629 if (!mchan->rx_buf) in zynqmp_ipi_setup()
632 mchan = &ipi_mbox->mchans[IPI_MB_CHNL_RX]; in zynqmp_ipi_setup()
636 mchan->req_buf_size = resource_size(&res); in zynqmp_ipi_setup()
637 mchan->req_buf = devm_ioremap(mdev, res.start, in zynqmp_ipi_setup()
638 mchan->req_buf_size); in zynqmp_ipi_setup()
639 if (!mchan->req_buf) { in zynqmp_ipi_setup()
651 mchan->resp_buf_size = resource_size(&res); in zynqmp_ipi_setup()
652 mchan->resp_buf = devm_ioremap(mdev, res.start, in zynqmp_ipi_setup()
653 mchan->resp_buf_size); in zynqmp_ipi_setup()
654 if (!mchan->resp_buf) { in zynqmp_ipi_setup()
662 mchan->rx_buf = devm_kzalloc(mdev, in zynqmp_ipi_setup()
663 mchan->resp_buf_size + in zynqmp_ipi_setup()
666 if (!mchan->rx_buf) in zynqmp_ipi_setup()