]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/blobdiff - arch/arm/plat-omap/dma.c
omap: dma: Fix buffering disable bit setting for omap24xx
[lisovros/linux_canprio.git] / arch / arm / plat-omap / dma.c
index ec7eddf9e525e4dc5a9d09a4b23ee3d635d6c14b..420cef370b33cdeed1fb02bf353c2be9b8d45073 100644 (file)
@@ -996,11 +996,17 @@ void omap_start_dma(int lch)
        l = dma_read(CCR(lch));
 
        /*
-        * Errata: On ES2.0 BUFFERING disable must be set.
-        * This will always fail on ES1.0
+        * Errata: Inter Frame DMA buffering issue (All OMAP2420 and
+        * OMAP2430ES1.0): DMA will wrongly buffer elements if packing and
+        * bursting is enabled. This might result in data gets stalled in
+        * FIFO at the end of the block.
+        * Workaround: DMA channels must have BUFFERING_DISABLED bit set to
+        * guarantee no data will stay in the DMA FIFO in case inter frame
+        * buffering occurs.
         */
-       if (cpu_is_omap24xx())
-               l |= OMAP_DMA_CCR_EN;
+       if (cpu_is_omap2420() ||
+           (cpu_is_omap2430() && (omap_type() == OMAP2430_REV_ES1_0)))
+               l |= OMAP_DMA_CCR_BUFFERING_DISABLE;
 
        l |= OMAP_DMA_CCR_EN;
        dma_write(l, CCR(lch));