Skip to contentSkip to conversation

OMAP: DMA: Init CDAC to Zero

PATCH Superseded Manjunatha GK 2 participants 2 messages Mar 3, 2010

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OMAP: DMA: Init CDAC to Zero

The register DMA4_CDAC needs to be initialized to zero before starting DMA transfer.

Cc Tony Lindgren <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Govindraj R <[email protected]>
Cc Kevin Hilman <[email protected]>

---
It was aligned to reset CDAC to zero in omap_start_dma(int lch) instead of creating new API for accessing CDAC register.

Discussion thread is at:
http://patchwork.kernel.org/patch/83176/
http://patchwork.kernel.org/patch/82948/

 arch/arm/plat-omap/dma.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
arch/arm/plat-omap/dma.c +8 -0
index 2ab224c..96741d4 100644
@@ -936,6 +936,14 @@ void omap_start_dma(int lch)
 {
 	u32 l;
 
+	/* CPC/CDAC register needs to be initialized to zero
+	 * before starting dma transfer.
+	 */
+	if (cpu_is_omap15xx())
+		dma_write(0, CPC(lch));
+	else
+		dma_write(0, CDAC(lch));
+
 	if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
 		int next_lch, cur_lch;
 		char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT];
Signature · 1 line
1.6.0.4
#1 lore raw
Quoted 26 lines · Manjunatha GK

The register DMA4_CDAC needs to be initialized to zero before starting DMA transfer.

Cc Tony Lindgren <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Govindraj R <[email protected]>
Cc Kevin Hilman <[email protected]>

---
It was aligned to reset CDAC to zero in omap_start_dma(int lch) instead of creating new API for accessing CDAC register.

Discussion thread is at:
http://patchwork.kernel.org/patch/83176/
http://patchwork.kernel.org/patch/82948/

 arch/arm/plat-omap/dma.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
arch/arm/plat-omap/dma.c +0 -0
index 2ab224c..96741d4 100644

arch/arm/plat-omap/dma.c void omap_start_dma(int lch) · line 941

Quoted 6 lines
arch/arm/plat-omap/dma.c +3 -0
@@ -936,6 +936,14 @@ void omap_start_dma(int lch)
 {
 	u32 l;
 
+	/* CPC/CDAC register needs to be initialized to zero
+	 * before starting dma transfer.
+	 */

Please fix the multi-line comment style. Search for 'multi-line' in Documentation/CodingStyle for details.

Kevin

Quoted 10 lines
arch/arm/plat-omap/dma.c +5 -0
+	if (cpu_is_omap15xx())
+		dma_write(0, CPC(lch));
+	else
+		dma_write(0, CDAC(lch));
+
 	if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
 		int next_lch, cur_lch;
 		char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT];
Signature · 1 line
1.6.0.4