Lines Matching refs:scmi_info

70 	struct scmi_smc *scmi_info = data;  in smc_msg_done_isr()  local
72 scmi_rx_callback(scmi_info->cinfo, in smc_msg_done_isr()
73 shmem_read_header(scmi_info->shmem), NULL); in smc_msg_done_isr()
88 static inline void smc_channel_lock_init(struct scmi_smc *scmi_info) in smc_channel_lock_init() argument
91 atomic_set(&scmi_info->inflight, INFLIGHT_NONE); in smc_channel_lock_init()
93 mutex_init(&scmi_info->shmem_lock); in smc_channel_lock_init()
106 smc_channel_lock_acquire(struct scmi_smc *scmi_info, in smc_channel_lock_acquire() argument
110 spin_until_cond(smc_xfer_inflight(xfer, &scmi_info->inflight)); in smc_channel_lock_acquire()
112 mutex_lock(&scmi_info->shmem_lock); in smc_channel_lock_acquire()
115 static inline void smc_channel_lock_release(struct scmi_smc *scmi_info) in smc_channel_lock_release() argument
118 atomic_set(&scmi_info->inflight, INFLIGHT_NONE); in smc_channel_lock_release()
120 mutex_unlock(&scmi_info->shmem_lock); in smc_channel_lock_release()
127 struct scmi_smc *scmi_info; in smc_chan_setup() local
137 scmi_info = devm_kzalloc(dev, sizeof(*scmi_info), GFP_KERNEL); in smc_chan_setup()
138 if (!scmi_info) in smc_chan_setup()
155 scmi_info->shmem = devm_ioremap(dev, res.start, size); in smc_chan_setup()
156 if (!scmi_info->shmem) { in smc_chan_setup()
166 scmi_info->param_page = SHMEM_PAGE(res.start); in smc_chan_setup()
167 scmi_info->param_offset = SHMEM_OFFSET(res.start); in smc_chan_setup()
174 scmi_info->irq = of_irq_get_byname(cdev->of_node, "a2p"); in smc_chan_setup()
175 if (scmi_info->irq > 0) { in smc_chan_setup()
176 ret = request_irq(scmi_info->irq, smc_msg_done_isr, in smc_chan_setup()
177 IRQF_NO_SUSPEND, dev_name(dev), scmi_info); in smc_chan_setup()
186 scmi_info->func_id = func_id; in smc_chan_setup()
187 scmi_info->cinfo = cinfo; in smc_chan_setup()
188 smc_channel_lock_init(scmi_info); in smc_chan_setup()
189 cinfo->transport_info = scmi_info; in smc_chan_setup()
197 struct scmi_smc *scmi_info = cinfo->transport_info; in smc_chan_free() local
200 if (scmi_info->irq > 0) in smc_chan_free()
201 free_irq(scmi_info->irq, scmi_info); in smc_chan_free()
204 scmi_info->cinfo = NULL; in smc_chan_free()
212 struct scmi_smc *scmi_info = cinfo->transport_info; in smc_send_message() local
214 unsigned long page = scmi_info->param_page; in smc_send_message()
215 unsigned long offset = scmi_info->param_offset; in smc_send_message()
221 smc_channel_lock_acquire(scmi_info, xfer); in smc_send_message()
223 shmem_tx_prepare(scmi_info->shmem, xfer, cinfo); in smc_send_message()
225 arm_smccc_1_1_invoke(scmi_info->func_id, page, offset, 0, 0, 0, 0, 0, in smc_send_message()
230 smc_channel_lock_release(scmi_info); in smc_send_message()
240 struct scmi_smc *scmi_info = cinfo->transport_info; in smc_fetch_response() local
242 shmem_fetch_response(scmi_info->shmem, xfer); in smc_fetch_response()
248 struct scmi_smc *scmi_info = cinfo->transport_info; in smc_mark_txdone() local
250 smc_channel_lock_release(scmi_info); in smc_mark_txdone()