Lines Matching refs:dma_cfg
109 struct dma_config *dma_cfg) in edma_config() argument
120 if (!dma_cfg->head_block) { in edma_config()
126 if (!EDMA_TransferWidthIsValid(data->hal_cfg, dma_cfg->source_data_size)) { in edma_config()
128 dma_cfg->source_data_size); in edma_config()
133 if (!EDMA_TransferWidthIsValid(data->hal_cfg, dma_cfg->dest_data_size)) { in edma_config()
135 dma_cfg->dest_data_size); in edma_config()
147 if (dma_cfg->block_count != 1) { in edma_config()
148 LOG_ERR("number of blocks %d not supported", dma_cfg->block_count); in edma_config()
153 if (!dma_cfg->head_block->source_address) { in edma_config()
159 if (!dma_cfg->head_block->dest_address) { in edma_config()
175 if (dma_cfg->head_block->source_address % dma_cfg->source_data_size) { in edma_config()
177 dma_cfg->head_block->source_address, in edma_config()
178 dma_cfg->source_data_size); in edma_config()
186 if (dma_cfg->head_block->dest_address % dma_cfg->dest_data_size) { in edma_config()
188 dma_cfg->head_block->dest_address, in edma_config()
189 dma_cfg->dest_data_size); in edma_config()
197 if (dma_cfg->source_burst_length != in edma_config()
198 dma_cfg->dest_burst_length) { in edma_config()
200 dma_cfg->source_burst_length, in edma_config()
201 dma_cfg->dest_burst_length); in edma_config()
214 if (dma_cfg->head_block->block_size % dma_cfg->source_burst_length) { in edma_config()
216 dma_cfg->head_block->block_size, in edma_config()
217 dma_cfg->source_burst_length); in edma_config()
231 if (dma_cfg->source_burst_length % in edma_config()
232 MAX(dma_cfg->source_data_size, dma_cfg->dest_data_size)) { in edma_config()
234 dma_cfg->source_burst_length, in edma_config()
235 dma_cfg->source_data_size, in edma_config()
236 dma_cfg->dest_data_size); in edma_config()
248 chan->bsize = dma_cfg->head_block->block_size; in edma_config()
250 if (dma_cfg->cyclic) { in edma_config()
260 switch (dma_cfg->channel_direction) { in edma_config()
273 dma_cfg->channel_direction); in edma_config()
287 ret = get_transfer_type(dma_cfg->channel_direction, &transfer_type); in edma_config()
292 chan->cb = dma_cfg->dma_callback; in edma_config()
293 chan->arg = dma_cfg->user_data; in edma_config()
297 dma_cfg->head_block->source_address, in edma_config()
298 dma_cfg->head_block->dest_address, in edma_config()
299 dma_cfg->source_data_size, in edma_config()
300 dma_cfg->dest_data_size, in edma_config()
301 dma_cfg->source_burst_length, in edma_config()
302 dma_cfg->head_block->block_size, in edma_config()
311 ret = EDMA_SetChannelMux(data->hal_cfg, chan_id, dma_cfg->dma_slot); in edma_config()
319 ret = set_slast_dlast(dma_cfg, transfer_type, data, chan_id); in edma_config()