Skip to contentSkip to conversation

24xx dma patch

PATCH In review Kyungmin Park 2 participants 2 messages Jan 6, 2006 – Jan 14, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 24xx dma patch

Hi

It reads DMA status too early and use callback function. It's make dma error on 24xx when playing the music.

Regards,

Kyungmin Park

--

arch/arm/plat-omap/dma.c +3 -1
@@ -866,8 +866,10 @@ static int omap2_dma_handle_ch(int ch)
 	val = 1 << (ch);
 	omap_writel(val, OMAP_DMA4_IRQSTATUS_L0);
 
-	if (likely(dma_chan[ch].callback != NULL))
+	if (likely(dma_chan[ch].callback != NULL)) {
+		status = OMAP_DMA_CSR_REG(ch);
 		dma_chan[ch].callback(ch, status, dma_chan[ch].data);
+	}
 
 	return 0;
 }
#1 lore raw

Hi,

Quoted 16 lines · Kyungmin Park

Hi

It reads DMA status too early and use callback function. It's make dma error on 24xx when playing the music.

Regards,

Kyungmin Park

--

arch/arm/plat-omap/dma.c +0 -0
@@ -866,8 +866,10 @@ static int omap2_dma_handle_ch(int ch)
 	val = 1 << (ch);

arch/arm/plat-omap/dma.c static int omap2_dma_handle_ch(int ch) · line 875

Quoted 10 lines
arch/arm/plat-omap/dma.c +3 -1
 	omap_writel(val, OMAP_DMA4_IRQSTATUS_L0);
 
-	if (likely(dma_chan[ch].callback != NULL))
+	if (likely(dma_chan[ch].callback != NULL)) {
+		status = OMAP_DMA_CSR_REG(ch);
 		dma_chan[ch].callback(ch, status, dma_chan[ch].data);
+	}
 
 	return 0;
 }

I don't quite understand this patch; Why does the status need to be read again?

Tony