Lines Matching refs:mchan

151 	struct zynqmp_ipi_mchan *mchan;  in zynqmp_ipi_interrupt()  local
162 mchan = &ipi_mbox->mchans[IPI_MB_CHNL_RX]; in zynqmp_ipi_interrupt()
167 if (mchan->is_opened) { in zynqmp_ipi_interrupt()
168 msg = mchan->rx_buf; in zynqmp_ipi_interrupt()
169 msg->len = mchan->req_buf_size; in zynqmp_ipi_interrupt()
170 memcpy_fromio(msg->data, mchan->req_buf, in zynqmp_ipi_interrupt()
191 struct zynqmp_ipi_mchan *mchan = chan->con_priv; in zynqmp_ipi_peek_data() local
205 if (mchan->chan_type == IPI_MB_CHNL_TX) { in zynqmp_ipi_peek_data()
231 struct zynqmp_ipi_mchan *mchan = chan->con_priv; in zynqmp_ipi_last_tx_done() local
241 if (mchan->chan_type == IPI_MB_CHNL_TX) { in zynqmp_ipi_last_tx_done()
269 struct zynqmp_ipi_mchan *mchan = chan->con_priv; in zynqmp_ipi_send_data() local
279 if (mchan->chan_type == IPI_MB_CHNL_TX) { in zynqmp_ipi_send_data()
281 if (msg && msg->len > mchan->req_buf_size) { in zynqmp_ipi_send_data()
283 mchan->chan_type, (unsigned int)msg->len, in zynqmp_ipi_send_data()
284 mchan->req_buf_size); in zynqmp_ipi_send_data()
288 memcpy_toio(mchan->req_buf, msg->data, msg->len); in zynqmp_ipi_send_data()
294 if (msg && msg->len > mchan->resp_buf_size) { in zynqmp_ipi_send_data()
296 mchan->chan_type, (unsigned int)msg->len, in zynqmp_ipi_send_data()
297 mchan->resp_buf_size); in zynqmp_ipi_send_data()
301 memcpy_toio(mchan->resp_buf, msg->data, msg->len); in zynqmp_ipi_send_data()
320 struct zynqmp_ipi_mchan *mchan = chan->con_priv; in zynqmp_ipi_startup() local
326 if (mchan->is_opened) in zynqmp_ipi_startup()
330 nchan_type = (mchan->chan_type + 1) % 2; in zynqmp_ipi_startup()
344 if (mchan->chan_type == IPI_MB_CHNL_RX) { in zynqmp_ipi_startup()
348 mchan->is_opened = 1; in zynqmp_ipi_startup()
362 struct zynqmp_ipi_mchan *mchan = chan->con_priv; in zynqmp_ipi_shutdown() local
367 if (!mchan->is_opened) in zynqmp_ipi_shutdown()
371 chan_type = mchan->chan_type; in zynqmp_ipi_shutdown()
383 mchan->is_opened = 0; in zynqmp_ipi_shutdown()
476 struct zynqmp_ipi_mchan *mchan; in zynqmp_ipi_mbox_probe() local
500 mchan = &ipi_mbox->mchans[IPI_MB_CHNL_TX]; in zynqmp_ipi_mbox_probe()
504 mchan->req_buf_size = resource_size(&res); in zynqmp_ipi_mbox_probe()
505 mchan->req_buf = devm_ioremap(mdev, res.start, in zynqmp_ipi_mbox_probe()
506 mchan->req_buf_size); in zynqmp_ipi_mbox_probe()
507 if (!mchan->req_buf) { in zynqmp_ipi_mbox_probe()
519 mchan->resp_buf_size = resource_size(&res); in zynqmp_ipi_mbox_probe()
520 mchan->resp_buf = devm_ioremap(mdev, res.start, in zynqmp_ipi_mbox_probe()
521 mchan->resp_buf_size); in zynqmp_ipi_mbox_probe()
522 if (!mchan->resp_buf) { in zynqmp_ipi_mbox_probe()
530 mchan->rx_buf = devm_kzalloc(mdev, in zynqmp_ipi_mbox_probe()
531 mchan->resp_buf_size + in zynqmp_ipi_mbox_probe()
534 if (!mchan->rx_buf) in zynqmp_ipi_mbox_probe()
537 mchan = &ipi_mbox->mchans[IPI_MB_CHNL_RX]; in zynqmp_ipi_mbox_probe()
541 mchan->req_buf_size = resource_size(&res); in zynqmp_ipi_mbox_probe()
542 mchan->req_buf = devm_ioremap(mdev, res.start, in zynqmp_ipi_mbox_probe()
543 mchan->req_buf_size); in zynqmp_ipi_mbox_probe()
544 if (!mchan->req_buf) { in zynqmp_ipi_mbox_probe()
556 mchan->resp_buf_size = resource_size(&res); in zynqmp_ipi_mbox_probe()
557 mchan->resp_buf = devm_ioremap(mdev, res.start, in zynqmp_ipi_mbox_probe()
558 mchan->resp_buf_size); in zynqmp_ipi_mbox_probe()
559 if (!mchan->resp_buf) { in zynqmp_ipi_mbox_probe()
567 mchan->rx_buf = devm_kzalloc(mdev, in zynqmp_ipi_mbox_probe()
568 mchan->resp_buf_size + in zynqmp_ipi_mbox_probe()
571 if (!mchan->rx_buf) in zynqmp_ipi_mbox_probe()