All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Manjunatha GK" <manjugk@ti.com>
To: linux-omap@vger.kernel.org
Cc: Manjunatha GK <manjugk@ti.com>, Tony Lindgren <tony@atomide.com>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Govindraj R <govindraj.raja@ti.com>,
	Kevin Hilman <khilman@deeprootsystems.com>
Subject: [PATCH v2] OMAP: DMA: Init CDAC to zero
Date: Thu, 04 Mar 2010 07:15:39 +0500	[thread overview]
Message-ID: <1267667139-17599-1-git-send-email-manjugk@ti.com> (raw)

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

Cc: Tony Lindgren <tony@atomide.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Govindraj R <govindraj.raja@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Reported-by:S, Venkatraman <svenkatr@ti.com>
Signed-off-by: Manjunatha GK <manjugk@ti.com>
---
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/

v2 changes:
Fixed multiline comments as per CodingStyle

 arch/arm/plat-omap/dma.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 2ab224c..f6c9bdc 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -936,6 +936,15 @@ void omap_start_dma(int lch)
 {
 	u32 l;
 
+	/*
+	 * The 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];
-- 
1.6.3.3


             reply	other threads:[~2010-03-04 16:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04  2:15 Manjunatha GK [this message]
2010-04-01 12:21 ` [PATCH v2] OMAP: DMA: Init CDAC to zero G, Manjunath Kondaiah
2010-03-04  7:11 Manjunatha GK

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=1267667139-17599-1-git-send-email-manjugk@ti.com \
    --to=manjugk@ti.com \
    --cc=govindraj.raja@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@ti.com \
    --cc=tony@atomide.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.