Lines Matching full:desc
31 LDMA_Descriptor_t *desc; member
90 struct dma_block_config *block, LDMA_Descriptor_t *desc) in dma_silabs_block_to_descriptor() argument
105 memset(desc, 0, sizeof(*desc)); in dma_silabs_block_to_descriptor()
107 desc->xfer.structReq = 1; in dma_silabs_block_to_descriptor()
120 desc->xfer.size = LOG2(src_size); in dma_silabs_block_to_descriptor()
132 desc->xfer.xferCnt = xfer_count; in dma_silabs_block_to_descriptor()
143 desc->xfer.blockSize = ret; in dma_silabs_block_to_descriptor()
148 desc->xfer.doneIfs = config->complete_callback_en; in dma_silabs_block_to_descriptor()
149 desc->xfer.reqMode = ldmaCtrlReqModeAll; in dma_silabs_block_to_descriptor()
150 desc->xfer.ignoreSrec = block->flow_control_mode; in dma_silabs_block_to_descriptor()
154 * to manage increment sign for each block desc which can't be done with in dma_silabs_block_to_descriptor()
155 * silabs LDMA. If increment sign is different in 2 block desc, then an in dma_silabs_block_to_descriptor()
164 desc->xfer.srcInc = ldmaCtrlSrcIncNone; in dma_silabs_block_to_descriptor()
166 desc->xfer.srcInc = ldmaCtrlSrcIncOne; in dma_silabs_block_to_descriptor()
170 desc->xfer.dstInc = ldmaCtrlDstIncNone; in dma_silabs_block_to_descriptor()
172 desc->xfer.dstInc = ldmaCtrlDstIncOne; in dma_silabs_block_to_descriptor()
175 desc->xfer.srcAddrMode = ldmaCtrlSrcAddrModeAbs; in dma_silabs_block_to_descriptor()
176 desc->xfer.dstAddrMode = ldmaCtrlDstAddrModeAbs; in dma_silabs_block_to_descriptor()
185 desc->xfer.srcAddr = block->source_address; in dma_silabs_block_to_descriptor()
186 desc->xfer.dstAddr = block->dest_address; in dma_silabs_block_to_descriptor()
191 static int dma_silabs_release_descriptor(struct dma_silabs_data *data, LDMA_Descriptor_t *desc) in dma_silabs_release_descriptor() argument
196 head_desc = desc; in dma_silabs_release_descriptor()
197 while (desc) { in dma_silabs_release_descriptor()
198 next_desc = LDMA_DESCRIPTOR_LINKABS_LINKADDR_TO_ADDR(desc->xfer.linkAddr); in dma_silabs_release_descriptor()
199 ret = sys_mem_blocks_free(data->dma_desc_pool, 1, (void **)&desc); in dma_silabs_release_descriptor()
203 desc = next_desc; in dma_silabs_release_descriptor()
205 if (desc == head_desc) { in dma_silabs_release_descriptor()
218 LDMA_Descriptor_t *desc, *prev_desc; in dma_silabs_configure_descriptor() local
223 * desc refers to driver configured block (LDMA_Descriptor_t structure from silabs in dma_silabs_configure_descriptor()
228 ret = sys_mem_blocks_alloc(data->dma_desc_pool, 1, (void **)&desc); in dma_silabs_configure_descriptor()
233 ret = dma_silabs_block_to_descriptor(config, chan_conf, block, desc); in dma_silabs_configure_descriptor()
239 chan_conf->desc = desc; in dma_silabs_configure_descriptor()
241 prev_desc->xfer.linkAddr = LDMA_DESCRIPTOR_LINKABS_ADDR_TO_LINKADDR(desc); in dma_silabs_configure_descriptor()
246 prev_desc = desc; in dma_silabs_configure_descriptor()
251 LDMA_DESCRIPTOR_LINKABS_ADDR_TO_LINKADDR(chan_conf->desc); in dma_silabs_configure_descriptor()
260 (void)dma_silabs_release_descriptor(data, chan_conf->desc); in dma_silabs_configure_descriptor()
324 ret = dma_silabs_release_descriptor(data, chan_conf->desc); in dma_silabs_configure()
420 LDMA_StartTransfer(channel, &chan->xfer_config, chan->desc); in dma_silabs_start()