Lines Matching full:spm

109 	struct k3_sec_proxy_mbox *spm = dev_get_priv(chan->dev);  in k3_sec_proxy_of_xlate()  local
120 for (i = 0; i < spm->desc->num_valid_threads; i++) in k3_sec_proxy_of_xlate()
121 if (spm->chans[i].id == ind) { in k3_sec_proxy_of_xlate()
123 chan->con_priv = &spm->chans[i]; in k3_sec_proxy_of_xlate()
202 struct k3_sec_proxy_mbox *spm = dev_get_priv(chan->dev); in k3_sec_proxy_send() local
218 if (msg->len > spm->desc->max_msg_size) { in k3_sec_proxy_send()
220 __func__, chan->id, msg->len, spm->desc->max_msg_size); in k3_sec_proxy_send()
225 data_reg = spt->data + spm->desc->data_start_offset; in k3_sec_proxy_send()
245 if (data_reg <= (spt->data + spm->desc->data_end_offset)) in k3_sec_proxy_send()
246 sp_writel(spt->data, spm->desc->data_end_offset, 0); in k3_sec_proxy_send()
263 struct k3_sec_proxy_mbox *spm = dev_get_priv(chan->dev); in k3_sec_proxy_recv() local
276 msg->len = spm->desc->max_msg_size; in k3_sec_proxy_recv()
278 data_reg = spt->data + spm->desc->data_start_offset; in k3_sec_proxy_recv()
280 for (num_words = spm->desc->max_msg_size / sizeof(u32); in k3_sec_proxy_recv()
302 * @spm: pointer to driver specific private data
307 struct k3_sec_proxy_mbox *spm) in k3_sec_proxy_of_to_priv() argument
316 spm->target_data = devfdt_get_addr_name(dev, "target_data"); in k3_sec_proxy_of_to_priv()
317 if (spm->target_data == FDT_ADDR_T_NONE) { in k3_sec_proxy_of_to_priv()
322 spm->scfg = devfdt_get_addr_name(dev, "scfg"); in k3_sec_proxy_of_to_priv()
323 if (spm->rt == FDT_ADDR_T_NONE) { in k3_sec_proxy_of_to_priv()
328 spm->rt = devfdt_get_addr_name(dev, "rt"); in k3_sec_proxy_of_to_priv()
329 if (spm->rt == FDT_ADDR_T_NONE) { in k3_sec_proxy_of_to_priv()
339 * @spm: Mailbox instance for which threads needs to be initialized
343 static int k3_sec_proxy_thread_setup(struct k3_sec_proxy_mbox *spm) in k3_sec_proxy_thread_setup() argument
348 for (i = 0; i < spm->desc->num_valid_threads; i++) { in k3_sec_proxy_thread_setup()
349 spt = &spm->chans[i]; in k3_sec_proxy_thread_setup()
350 ind = spm->desc->valid_threads[i]; in k3_sec_proxy_thread_setup()
352 spt->data = (void *)SEC_PROXY_THREAD(spm->target_data, ind); in k3_sec_proxy_thread_setup()
353 spt->scfg = (void *)SEC_PROXY_THREAD(spm->scfg, ind); in k3_sec_proxy_thread_setup()
354 spt->rt = (void *)SEC_PROXY_THREAD(spm->rt, ind); in k3_sec_proxy_thread_setup()
355 spt->rx_buf = calloc(1, spm->desc->max_msg_size); in k3_sec_proxy_thread_setup()
371 struct k3_sec_proxy_mbox *spm = dev_get_priv(dev); in k3_sec_proxy_probe() local
376 ret = k3_sec_proxy_of_to_priv(dev, spm); in k3_sec_proxy_probe()
380 spm->desc = (void *)dev_get_driver_data(dev); in k3_sec_proxy_probe()
381 spm->chans = calloc(spm->desc->num_valid_threads, in k3_sec_proxy_probe()
383 if (!spm->chans) in k3_sec_proxy_probe()
386 ret = k3_sec_proxy_thread_setup(spm); in k3_sec_proxy_probe()
397 struct k3_sec_proxy_mbox *spm = dev_get_priv(dev); in k3_sec_proxy_remove() local
401 free(spm->chans); in k3_sec_proxy_remove()