diff mbox

[07/10] ARM: OMAP2/3: sDMA: Correct omap_request_dma_chain(), v2

Message ID 20090525162857.GC29933@atomide.com (mailing list archive)
State Awaiting Upstream, archived
Headers show

Commit Message

Tony Lindgren May 25, 2009, 4:28 p.m. UTC
* Shilimkar, Santosh <santosh.shilimkar@ti.com> [090525 02:40]:
> > -----Original Message-----
> > From: Russell King - ARM Linux [mailto:linux@arm.linux.org.uk] 
> > Sent: Monday, May 25, 2009 3:04 PM
> > To: Tony Lindgren
> > Cc: linux-arm-kernel@lists.arm.linux.org.uk; 
> > linux-omap@vger.kernel.org; Shilimkar, Santosh
> > Subject: Re: [PATCH 07/10] ARM: OMAP2/3: sDMA: Correct 
> > omap_request_dma_chain()
> > 
> > On Tue, May 19, 2009 at 04:40:07PM -0700, Tony Lindgren wrote:
> > > From: Santosh Shilimkar <santosh.shilimkar@ti.com>
> > > 
> > > Original OMAP DMA chaining design has chain_id as one of 
> > the callback
> > > parameters. Patch 538528de0cb256f65716ab2e9613d9e920f97fe2 broke
> > > the desing.
> > > 
> > > Change the callback to return the logical channel number and not
> > > chain_id.
> > 
> > This patch does not make a material change.  It merely 
> > changes the name
> > used in a couple function pointer prototype.  This has no 
> > impact on the
> > generated code - iow, it's cosmetic.
> Yes it does look cosmetic but if you see the API signature, it corrects the callback parameters which actually the DMA lib sends. 
> 
> The current API signature is misleading for chained DMA transfers where the actual driver passes 'channel number' as one of the callback parameter instead of chain_id which was the original design.

Here's this one with more descriptive comments.

Tony

Comments

Santosh Shilimkar May 26, 2009, 4:55 a.m. UTC | #1
> -----Original Message-----
> From: Tony Lindgren [mailto:tony@atomide.com] 
> Sent: Monday, May 25, 2009 9:59 PM
> To: Shilimkar, Santosh
> Cc: Russell King - ARM Linux; 
> linux-arm-kernel@lists.arm.linux.org.uk; linux-omap@vger.kernel.org
> Subject: Re: [PATCH 07/10] ARM: OMAP2/3: sDMA: Correct 
> omap_request_dma_chain(), v2
> 
> * Shilimkar, Santosh <santosh.shilimkar@ti.com> [090525 02:40]:
> > > -----Original Message-----
> > > From: Russell King - ARM Linux [mailto:linux@arm.linux.org.uk] 
> > > Sent: Monday, May 25, 2009 3:04 PM
> > > To: Tony Lindgren
> > > Cc: linux-arm-kernel@lists.arm.linux.org.uk; 
> > > linux-omap@vger.kernel.org; Shilimkar, Santosh
> > > Subject: Re: [PATCH 07/10] ARM: OMAP2/3: sDMA: Correct 
> > > omap_request_dma_chain()
> > > 
> > > On Tue, May 19, 2009 at 04:40:07PM -0700, Tony Lindgren wrote:
> > > > From: Santosh Shilimkar <santosh.shilimkar@ti.com>
> > > > 
> > > > Original OMAP DMA chaining design has chain_id as one of 
> > > the callback
> > > > parameters. Patch 538528de0cb256f65716ab2e9613d9e920f97fe2 broke
> > > > the desing.
> > > > 
> > > > Change the callback to return the logical channel number and not
> > > > chain_id.
> > > 
> > > This patch does not make a material change.  It merely 
> > > changes the name
> > > used in a couple function pointer prototype.  This has no 
> > > impact on the
> > > generated code - iow, it's cosmetic.
> > Yes it does look cosmetic but if you see the API signature, 
> it corrects the callback parameters which actually the DMA lib sends. 
> > 
> > The current API signature is misleading for chained DMA 
> transfers where the actual driver passes 'channel number' as 
> one of the callback parameter instead of chain_id which was 
> the original design.
> 
> Here's this one with more descriptive comments.

Thanks Tony !!

Regards,
Santosh
 --
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

From eb76d1e31e2da419a66e16f90504ac3f8cdb6874 Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date: Thu, 21 May 2009 09:11:31 -0700
Subject: [PATCH] ARM: OMAP2/3: sDMA: Correct omap_request_dma_chain(), v2

Original OMAP DMA chaining design had chain_id as one of the callback
parameters. Patch 538528de0cb256f65716ab2e9613d9e920f97fe2 changed it
to use logical channel instead.

Correct the naming for callback to also use logical channel number
instead of the chain_id.

More details are on this email thread:

http://marc.info/?l=linux-omap&m=122961071931459&w=2

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 58d98ad..06e9cbe 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -1220,7 +1220,7 @@  static void create_dma_lch_chain(int lch_head, int lch_queue)
  * 	     Failure: -EINVAL/-ENOMEM
  */
 int omap_request_dma_chain(int dev_id, const char *dev_name,
-			   void (*callback) (int chain_id, u16 ch_status,
+			   void (*callback) (int lch, u16 ch_status,
 					     void *data),
 			   int *chain_id, int no_of_chans, int chain_mode,
 			   struct omap_dma_channel_params params)
diff --git a/arch/arm/plat-omap/include/mach/dma.h b/arch/arm/plat-omap/include/mach/dma.h
index 35fefdb..19df76f 100644
--- a/arch/arm/plat-omap/include/mach/dma.h
+++ b/arch/arm/plat-omap/include/mach/dma.h
@@ -532,7 +532,7 @@  extern int omap_get_dma_index(int lch, int *ei, int *fi);
 /* Chaining APIs */
 #ifndef CONFIG_ARCH_OMAP1
 extern int omap_request_dma_chain(int dev_id, const char *dev_name,
-				  void (*callback) (int chain_id, u16 ch_status,
+				  void (*callback) (int lch, u16 ch_status,
 						    void *data),
 				  int *chain_id, int no_of_chans,
 				  int chain_mode,