All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Venkatraman S <svenkatr@ti.com>,
	linux-kernel@vger.kernel.org,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Hari n <hari.zoom@gmail.com>, Jarkko Nikula <jhnikula@gmail.com>,
	linux-omap@vger.kernel.org
Subject: [PATCH 02/10] omap: SDMA: Fix omap_stop_dma() API for channel linking
Date: Thu, 22 Oct 2009 15:11:37 -0700	[thread overview]
Message-ID: <20091022221136.27408.73433.stgit@localhost> (raw)
In-Reply-To: <20091022221013.27408.443.stgit@localhost>

From: Santosh Shilimkar <santosh.shilimkar@ti.com>

OMAP sDMA driver API omap_stop_dma() doesn't really stop the dma when used
in linking scenario.

The DMA channel needs to be disabled before resetting the chain.
Also fix clearing of the OMAP_DMA_ACTIVE status in the linked case.

Cc: Hari n <hari.zoom@gmail.com>
Cc: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/dma.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 0eb676d..b53125f 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -978,6 +978,14 @@ void omap_stop_dma(int lch)
 {
 	u32 l;
 
+	/* Disable all interrupts on the channel */
+	if (cpu_class_is_omap1())
+		dma_write(0, CICR(lch));
+
+	l = dma_read(CCR(lch));
+	l &= ~OMAP_DMA_CCR_EN;
+	dma_write(l, CCR(lch));
+
 	if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
 		int next_lch, cur_lch = lch;
 		char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT];
@@ -995,18 +1003,8 @@ void omap_stop_dma(int lch)
 			next_lch = dma_chan[cur_lch].next_lch;
 			cur_lch = next_lch;
 		} while (next_lch != -1);
-
-		return;
 	}
 
-	/* Disable all interrupts on the channel */
-	if (cpu_class_is_omap1())
-		dma_write(0, CICR(lch));
-
-	l = dma_read(CCR(lch));
-	l &= ~OMAP_DMA_CCR_EN;
-	dma_write(l, CCR(lch));
-
 	dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
 }
 EXPORT_SYMBOL(omap_stop_dma);

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/10] omap: SDMA: Fix omap_stop_dma() API for channel linking
Date: Thu, 22 Oct 2009 15:11:37 -0700	[thread overview]
Message-ID: <20091022221136.27408.73433.stgit@localhost> (raw)
In-Reply-To: <20091022221013.27408.443.stgit@localhost>

From: Santosh Shilimkar <santosh.shilimkar@ti.com>

OMAP sDMA driver API omap_stop_dma() doesn't really stop the dma when used
in linking scenario.

The DMA channel needs to be disabled before resetting the chain.
Also fix clearing of the OMAP_DMA_ACTIVE status in the linked case.

Cc: Hari n <hari.zoom@gmail.com>
Cc: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/dma.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 0eb676d..b53125f 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -978,6 +978,14 @@ void omap_stop_dma(int lch)
 {
 	u32 l;
 
+	/* Disable all interrupts on the channel */
+	if (cpu_class_is_omap1())
+		dma_write(0, CICR(lch));
+
+	l = dma_read(CCR(lch));
+	l &= ~OMAP_DMA_CCR_EN;
+	dma_write(l, CCR(lch));
+
 	if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
 		int next_lch, cur_lch = lch;
 		char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT];
@@ -995,18 +1003,8 @@ void omap_stop_dma(int lch)
 			next_lch = dma_chan[cur_lch].next_lch;
 			cur_lch = next_lch;
 		} while (next_lch != -1);
-
-		return;
 	}
 
-	/* Disable all interrupts on the channel */
-	if (cpu_class_is_omap1())
-		dma_write(0, CICR(lch));
-
-	l = dma_read(CCR(lch));
-	l &= ~OMAP_DMA_CCR_EN;
-	dma_write(l, CCR(lch));
-
 	dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
 }
 EXPORT_SYMBOL(omap_stop_dma);

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Venkatraman S <svenkatr@ti.com>,
	linux-kernel@vger.kernel.org,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Jarkko Nikula <jhnikula@gmail.com>, Hari n <hari.zoom@gmail.com>,
	linux-omap@vger.kernel.org
Subject: [PATCH 02/10] omap: SDMA: Fix omap_stop_dma() API for channel linking
Date: Thu, 22 Oct 2009 15:11:37 -0700	[thread overview]
Message-ID: <20091022221136.27408.73433.stgit@localhost> (raw)
In-Reply-To: <20091022221013.27408.443.stgit@localhost>

From: Santosh Shilimkar <santosh.shilimkar@ti.com>

OMAP sDMA driver API omap_stop_dma() doesn't really stop the dma when used
in linking scenario.

The DMA channel needs to be disabled before resetting the chain.
Also fix clearing of the OMAP_DMA_ACTIVE status in the linked case.

Cc: Hari n <hari.zoom@gmail.com>
Cc: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/dma.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 0eb676d..b53125f 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -978,6 +978,14 @@ void omap_stop_dma(int lch)
 {
 	u32 l;
 
+	/* Disable all interrupts on the channel */
+	if (cpu_class_is_omap1())
+		dma_write(0, CICR(lch));
+
+	l = dma_read(CCR(lch));
+	l &= ~OMAP_DMA_CCR_EN;
+	dma_write(l, CCR(lch));
+
 	if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
 		int next_lch, cur_lch = lch;
 		char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT];
@@ -995,18 +1003,8 @@ void omap_stop_dma(int lch)
 			next_lch = dma_chan[cur_lch].next_lch;
 			cur_lch = next_lch;
 		} while (next_lch != -1);
-
-		return;
 	}
 
-	/* Disable all interrupts on the channel */
-	if (cpu_class_is_omap1())
-		dma_write(0, CICR(lch));
-
-	l = dma_read(CCR(lch));
-	l &= ~OMAP_DMA_CCR_EN;
-	dma_write(l, CCR(lch));
-
 	dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
 }
 EXPORT_SYMBOL(omap_stop_dma);


  parent reply	other threads:[~2009-10-22 22:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-22 22:11 [PATCH 00/10] omap fixes for v2.6.32-rc5 Tony Lindgren
2009-10-22 22:11 ` Tony Lindgren
2009-10-22 22:11 ` [PATCH 01/10] omap: Fix omap-keypad by restoring old keypad.h without breaking omap2 boards that use matrix_keypad Tony Lindgren
2009-10-22 22:11   ` Tony Lindgren
2009-10-22 22:11 ` Tony Lindgren [this message]
2009-10-22 22:11   ` [PATCH 02/10] omap: SDMA: Fix omap_stop_dma() API for channel linking Tony Lindgren
2009-10-22 22:11   ` Tony Lindgren
2009-10-22 22:11 ` [PATCH 03/10] omap: iommu: fix wrong condition check for SUPERSECTION Tony Lindgren
2009-10-22 22:11   ` Tony Lindgren
2009-10-22 22:12 ` [PATCH 04/10] omap1: Fix redundant UARTs pin muxing that can break other hardware support Tony Lindgren
2009-10-22 22:12   ` Tony Lindgren
2009-10-22 22:12 ` [PATCH 05/10] omap1: Fix DSP public peripherals support for ams-delta Tony Lindgren
2009-10-22 22:12   ` Tony Lindgren
2009-10-22 23:22   ` Jon Hunter
2009-10-22 23:22     ` Jon Hunter
2009-10-23 19:19     ` Tony Lindgren
2009-10-23 19:19       ` Tony Lindgren
2009-10-23 23:11       ` Janusz Krzysztofik
2009-10-23 23:11         ` Janusz Krzysztofik
2009-10-23 23:11         ` Janusz Krzysztofik
2009-10-22 22:12 ` [PATCH 06/10] omap: Fix detection of n8x0 Tony Lindgren
2009-10-22 22:12   ` Tony Lindgren
2009-10-22 22:12 ` [PATCH 07/10] omap2: Fix console serial port number for n8x0 Tony Lindgren
2009-10-22 22:12   ` Tony Lindgren
2009-10-22 22:12 ` [PATCH 08/10] omap3: PM: enable UART3 module wakeups Tony Lindgren
2009-10-22 22:12   ` Tony Lindgren
2009-10-22 22:13 ` [PATCH 09/10] omap4: Allow omap_serial_early_init() for OMAP4430 board Tony Lindgren
2009-10-22 22:13   ` Tony Lindgren
2009-10-22 22:13 ` [PATCH 10/10] omap4: Fix UART4 platform data on omap4 Tony Lindgren
2009-10-22 22:13   ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091022221136.27408.73433.stgit@localhost \
    --to=tony@atomide.com \
    --cc=hari.zoom@gmail.com \
    --cc=jhnikula@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@ti.com \
    --cc=svenkatr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.