diff mbox

[v4,3/4] OMAP2: DMA: Use errata flag for disabling buffering

Message ID 1286180294-32618-4-git-send-email-peter.ujfalusi@nokia.com (mailing list archive)
State Superseded, archived
Delegated to: Tony Lindgren
Headers show

Commit Message

Peter Ujfalusi Oct. 4, 2010, 8:18 a.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index ae0ff64..c116c41 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -147,6 +147,7 @@  static const u8 omap1_dma_irq[OMAP1_LOGICAL_DMA_CH_COUNT] = {
 };
 
 /* Errata handling */
+#define DMA_ERRATA_IFRAME_BUFFERING	(1 << 0)
 static u16 dma_errata;
 #define IS_DMA_ERRATA(id)	(dma_errata & (id))
 
@@ -1003,8 +1004,7 @@  void omap_start_dma(int lch)
 	 * Errata: On ES2.0 BUFFERING disable must be set.
 	 * This will always fail on ES1.0
 	 */
-	if (cpu_is_omap2420() ||
-	    (cpu_is_omap2430() && (omap_type() == OMAP2430_REV_ES1_0)))
+	if (IS_DMA_ERRATA(DMA_ERRATA_IFRAME_BUFFERING))
 		l |= OMAP_DMA_CCR_BUFFERING_DISABLE;
 
 	l |= OMAP_DMA_CCR_EN;
@@ -2048,6 +2048,9 @@  void omap_dma_global_context_restore(void)
 
 static void dma_errata_configure(void)
 {
+	if (cpu_is_omap2420() ||
+	    (cpu_is_omap2430() && (omap_type() == OMAP2430_REV_ES1_0)))
+		dma_errata |= DMA_ERRATA_IFRAME_BUFFERING;
 }
 
 static int __init omap_init_dma(void)