Lines Matching refs:cinfo
216 struct scmi_chan_info *cinfo = client_to_scmi_chan_info(cl); in scmi_rx_callback() local
217 struct device *dev = cinfo->dev; in scmi_rx_callback()
218 struct scmi_info *info = handle_to_scmi_info(cinfo->handle); in scmi_rx_callback()
220 struct scmi_shared_mem __iomem *mem = cinfo->payload; in scmi_rx_callback()
271 struct scmi_chan_info *cinfo = client_to_scmi_chan_info(cl); in scmi_tx_prepare() local
272 struct scmi_shared_mem __iomem *mem = cinfo->payload; in scmi_tx_prepare()
351 scmi_xfer_poll_done(const struct scmi_chan_info *cinfo, struct scmi_xfer *xfer) in scmi_xfer_poll_done() argument
353 struct scmi_shared_mem __iomem *mem = cinfo->payload; in scmi_xfer_poll_done()
366 static bool scmi_xfer_done_no_timeout(const struct scmi_chan_info *cinfo, in scmi_xfer_done_no_timeout() argument
371 return scmi_xfer_poll_done(cinfo, xfer) || ktime_after(__cur, stop); in scmi_xfer_done_no_timeout()
390 struct scmi_chan_info *cinfo; in scmi_do_xfer() local
392 cinfo = idr_find(&info->tx_idr, xfer->hdr.protocol_id); in scmi_do_xfer()
393 if (unlikely(!cinfo)) in scmi_do_xfer()
396 ret = mbox_send_message(cinfo->chan, xfer); in scmi_do_xfer()
408 spin_until_cond(scmi_xfer_done_no_timeout(cinfo, xfer, stop)); in scmi_do_xfer()
411 scmi_fetch_response(xfer, cinfo->payload); in scmi_do_xfer()
433 mbox_client_txdone(cinfo->chan, ret); in scmi_do_xfer()
664 struct scmi_chan_info *cinfo = p; in scmi_mbox_free_channel() local
667 if (!IS_ERR_OR_NULL(cinfo->chan)) { in scmi_mbox_free_channel()
668 mbox_free_channel(cinfo->chan); in scmi_mbox_free_channel()
669 cinfo->chan = NULL; in scmi_mbox_free_channel()
707 struct scmi_chan_info *cinfo; in scmi_mbox_chan_setup() local
711 cinfo = idr_find(&info->tx_idr, SCMI_PROTOCOL_BASE); in scmi_mbox_chan_setup()
715 cinfo = devm_kzalloc(info->dev, sizeof(*cinfo), GFP_KERNEL); in scmi_mbox_chan_setup()
716 if (!cinfo) in scmi_mbox_chan_setup()
719 cinfo->dev = dev; in scmi_mbox_chan_setup()
721 cl = &cinfo->cl; in scmi_mbox_chan_setup()
737 cinfo->payload = devm_ioremap(info->dev, res.start, size); in scmi_mbox_chan_setup()
738 if (!cinfo->payload) { in scmi_mbox_chan_setup()
744 cinfo->chan = mbox_request_channel(cl, 0); in scmi_mbox_chan_setup()
745 if (IS_ERR(cinfo->chan)) { in scmi_mbox_chan_setup()
746 ret = PTR_ERR(cinfo->chan); in scmi_mbox_chan_setup()
753 ret = idr_alloc(&info->tx_idr, cinfo, prot_id, prot_id + 1, GFP_KERNEL); in scmi_mbox_chan_setup()
759 cinfo->handle = &info->handle; in scmi_mbox_chan_setup()