struct imxdma_channel_internal {
unsigned int resbytes;
- int in_use;
-
struct timer_list watchdog;
int hw_chaining;
pr_debug("imxdma%d: imx_dma_enable\n", channel);
- if (imxdmac->internal.in_use)
- return;
-
local_irq_save(flags);
imx_dmav1_writel(1 << channel, DMA_DISR);
DMA_CCR(channel));
}
}
- imxdmac->internal.in_use = 1;
local_irq_restore(flags);
}
imx_dmav1_writel(imx_dmav1_readl(DMA_CCR(channel)) & ~CCR_CEN,
DMA_CCR(channel));
imx_dmav1_writel(1 << channel, DMA_DISR);
- imxdmac->internal.in_use = 0;
local_irq_restore(flags);
}
int channel = imxdmac->channel;
imx_dmav1_writel(0, DMA_CCR(channel));
- imxdmac->internal.in_use = 0;
/* Tasklet watchdog error handler */
tasklet_schedule(&imxdmac->dma_tasklet);
out:
imx_dmav1_writel(0, DMA_CCR(chno));
- imxdma->in_use = 0;
/* Tasklet irq */
tasklet_schedule(&imxdmac->dma_tasklet);
}