Lines Matching refs:smbox

39 	struct scmi_mailbox *smbox = client_to_scmi_mailbox(cl);  in tx_prepare()  local
41 shmem_tx_prepare(smbox->shmem, m, smbox->cinfo); in tx_prepare()
46 struct scmi_mailbox *smbox = client_to_scmi_mailbox(cl); in rx_callback() local
48 scmi_rx_callback(smbox->cinfo, shmem_read_header(smbox->shmem), NULL); in rx_callback()
150 struct scmi_mailbox *smbox; in mailbox_chan_setup() local
164 smbox = devm_kzalloc(dev, sizeof(*smbox), GFP_KERNEL); in mailbox_chan_setup()
165 if (!smbox) in mailbox_chan_setup()
182 smbox->shmem = devm_ioremap(dev, res.start, size); in mailbox_chan_setup()
183 if (!smbox->shmem) { in mailbox_chan_setup()
188 cl = &smbox->cl; in mailbox_chan_setup()
195 smbox->chan = mbox_request_channel(cl, tx ? 0 : p2a_chan); in mailbox_chan_setup()
196 if (IS_ERR(smbox->chan)) { in mailbox_chan_setup()
197 ret = PTR_ERR(smbox->chan); in mailbox_chan_setup()
206 smbox->chan_receiver = mbox_request_channel(cl, a2p_rx_chan); in mailbox_chan_setup()
207 if (IS_ERR(smbox->chan_receiver)) { in mailbox_chan_setup()
208 ret = PTR_ERR(smbox->chan_receiver); in mailbox_chan_setup()
215 cinfo->transport_info = smbox; in mailbox_chan_setup()
216 smbox->cinfo = cinfo; in mailbox_chan_setup()
224 struct scmi_mailbox *smbox = cinfo->transport_info; in mailbox_chan_free() local
226 if (smbox && !IS_ERR(smbox->chan)) { in mailbox_chan_free()
227 mbox_free_channel(smbox->chan); in mailbox_chan_free()
228 mbox_free_channel(smbox->chan_receiver); in mailbox_chan_free()
230 smbox->chan = NULL; in mailbox_chan_free()
231 smbox->chan_receiver = NULL; in mailbox_chan_free()
232 smbox->cinfo = NULL; in mailbox_chan_free()
241 struct scmi_mailbox *smbox = cinfo->transport_info; in mailbox_send_message() local
244 ret = mbox_send_message(smbox->chan, xfer); in mailbox_send_message()
256 struct scmi_mailbox *smbox = cinfo->transport_info; in mailbox_mark_txdone() local
264 mbox_client_txdone(smbox->chan, ret); in mailbox_mark_txdone()
270 struct scmi_mailbox *smbox = cinfo->transport_info; in mailbox_fetch_response() local
272 shmem_fetch_response(smbox->shmem, xfer); in mailbox_fetch_response()
278 struct scmi_mailbox *smbox = cinfo->transport_info; in mailbox_fetch_notification() local
280 shmem_fetch_notification(smbox->shmem, max_len, xfer); in mailbox_fetch_notification()
285 struct scmi_mailbox *smbox = cinfo->transport_info; in mailbox_clear_channel() local
287 shmem_clear_channel(smbox->shmem); in mailbox_clear_channel()
293 struct scmi_mailbox *smbox = cinfo->transport_info; in mailbox_poll_done() local
295 return shmem_poll_done(smbox->shmem, xfer); in mailbox_poll_done()