public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP: DMA: Init CDAC to Zero
@ 2010-03-03  9:55 Manjunatha GK
  2010-03-03 18:29 ` Kevin Hilman
  0 siblings, 1 reply; 2+ messages in thread
From: Manjunatha GK @ 2010-03-03  9:55 UTC (permalink / raw)
  To: linux-omap
  Cc: Manjunatha GK, Tony Lindgren, Santosh Shilimkar, Govindraj R,
	Kevin Hilman

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/


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

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 2ab224c..96741d4 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -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];
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] OMAP: DMA: Init CDAC to Zero
  2010-03-03  9:55 [PATCH] OMAP: DMA: Init CDAC to Zero Manjunatha GK
@ 2010-03-03 18:29 ` Kevin Hilman
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Hilman @ 2010-03-03 18:29 UTC (permalink / raw)
  To: Manjunatha GK; +Cc: linux-omap, Tony Lindgren, Santosh Shilimkar, Govindraj R

Manjunatha GK <manjugk@ti.com> writes:

> 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/
>
>
>  arch/arm/plat-omap/dma.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index 2ab224c..96741d4 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -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

> +	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.0.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-03 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-03  9:55 [PATCH] OMAP: DMA: Init CDAC to Zero Manjunatha GK
2010-03-03 18:29 ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox