Lines Matching refs:cinfo
247 struct scmi_chan_info *cinfo = client_to_scmi_chan_info(cl); in scmi_tx_prepare() local
248 struct scmi_shared_mem __iomem *mem = cinfo->payload; in scmi_tx_prepare()
352 struct scmi_chan_info *cinfo = client_to_scmi_chan_info(cl); in scmi_rx_callback() local
353 struct device *dev = cinfo->dev; in scmi_rx_callback()
354 struct scmi_info *info = handle_to_scmi_info(cinfo->handle); in scmi_rx_callback()
356 struct scmi_shared_mem __iomem *mem = cinfo->payload; in scmi_rx_callback()
397 scmi_xfer_poll_done(const struct scmi_chan_info *cinfo, struct scmi_xfer *xfer) in scmi_xfer_poll_done() argument
399 struct scmi_shared_mem __iomem *mem = cinfo->payload; in scmi_xfer_poll_done()
412 static bool scmi_xfer_done_no_timeout(const struct scmi_chan_info *cinfo, in scmi_xfer_done_no_timeout() argument
417 return scmi_xfer_poll_done(cinfo, xfer) || ktime_after(__cur, stop); in scmi_xfer_done_no_timeout()
436 struct scmi_chan_info *cinfo; in scmi_do_xfer() local
438 cinfo = idr_find(&info->tx_idr, xfer->hdr.protocol_id); in scmi_do_xfer()
439 if (unlikely(!cinfo)) in scmi_do_xfer()
442 ret = mbox_send_message(cinfo->chan, xfer); in scmi_do_xfer()
454 spin_until_cond(scmi_xfer_done_no_timeout(cinfo, xfer, stop)); in scmi_do_xfer()
457 scmi_fetch_response(xfer, cinfo->payload); in scmi_do_xfer()
479 mbox_client_txdone(cinfo->chan, ret); in scmi_do_xfer()
729 struct scmi_chan_info *cinfo; in scmi_mbox_chan_setup() local
739 cinfo = idr_find(idr, SCMI_PROTOCOL_BASE); in scmi_mbox_chan_setup()
740 if (unlikely(!cinfo)) /* Possible only if platform has no Rx */ in scmi_mbox_chan_setup()
745 cinfo = devm_kzalloc(info->dev, sizeof(*cinfo), GFP_KERNEL); in scmi_mbox_chan_setup()
746 if (!cinfo) in scmi_mbox_chan_setup()
749 cinfo->dev = dev; in scmi_mbox_chan_setup()
751 cl = &cinfo->cl; in scmi_mbox_chan_setup()
767 cinfo->payload = devm_ioremap(info->dev, res.start, size); in scmi_mbox_chan_setup()
768 if (!cinfo->payload) { in scmi_mbox_chan_setup()
773 cinfo->chan = mbox_request_channel(cl, idx); in scmi_mbox_chan_setup()
774 if (IS_ERR(cinfo->chan)) { in scmi_mbox_chan_setup()
775 ret = PTR_ERR(cinfo->chan); in scmi_mbox_chan_setup()
783 ret = idr_alloc(idr, cinfo, prot_id, prot_id + 1, GFP_KERNEL); in scmi_mbox_chan_setup()
789 cinfo->handle = &info->handle; in scmi_mbox_chan_setup()
903 struct scmi_chan_info *cinfo = p; in scmi_mbox_free_channel() local
906 if (!IS_ERR_OR_NULL(cinfo->chan)) { in scmi_mbox_free_channel()
907 mbox_free_channel(cinfo->chan); in scmi_mbox_free_channel()
908 cinfo->chan = NULL; in scmi_mbox_free_channel()