mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-13 09:58:54 +00:00
v1.0.4
This commit is contained in:
@@ -216,24 +216,28 @@ int aic_set_burst(struct dma_slave_config *sconfig,
|
||||
struct aic_dma_task *aic_dma_task_alloc(void)
|
||||
{
|
||||
struct aic_dma_task *task;
|
||||
|
||||
unsigned long state;
|
||||
/* Remove the QH structure from the freelist */
|
||||
|
||||
aicos_local_irq_save(&state);
|
||||
task = aich_dma.freetask;
|
||||
|
||||
if (task) {
|
||||
aich_dma.freetask = task->v_next;
|
||||
memset(task, 0, sizeof(struct aic_dma_task));
|
||||
}
|
||||
|
||||
aicos_local_irq_restore(state);
|
||||
return task;
|
||||
}
|
||||
|
||||
static void aic_dma_task_free(struct aic_dma_task *task)
|
||||
{
|
||||
unsigned long state;
|
||||
CHECK_PARAM_RET(task != NULL);
|
||||
|
||||
aicos_local_irq_save(&state);
|
||||
task->v_next = aich_dma.freetask;
|
||||
aich_dma.freetask = task;
|
||||
aicos_local_irq_restore(state);
|
||||
}
|
||||
|
||||
void *aic_dma_task_add(struct aic_dma_task *prev,
|
||||
@@ -401,7 +405,9 @@ struct aic_dma_chan *hal_request_dma_chan(void)
|
||||
{
|
||||
int i = 0;
|
||||
struct aic_dma_chan *chan;
|
||||
unsigned long state;
|
||||
|
||||
aicos_local_irq_save(&state);
|
||||
for (i = 0; i < AIC_DMA_CH_NUM; i++)
|
||||
{
|
||||
chan = &aich_dma.dma_chan[i];
|
||||
@@ -414,10 +420,11 @@ struct aic_dma_chan *hal_request_dma_chan(void)
|
||||
chan->callback = NULL;
|
||||
chan->callback_param = NULL;
|
||||
chan->desc = NULL;
|
||||
aicos_local_irq_restore(state);
|
||||
return chan;
|
||||
}
|
||||
}
|
||||
|
||||
aicos_local_irq_restore(state);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user