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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Shilimkar, Santosh <santosh.shilimkar@xxxxxx> [090525 02:40]:
> > -----Original Message-----
> > From: Russell King - ARM Linux [mailto:linux@xxxxxxxxxxxxxxxx] 
> > Sent: Monday, May 25, 2009 3:04 PM
> > To: Tony Lindgren
> > Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxxxxx; 
> > linux-omap@xxxxxxxxxxxxxxx; 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@xxxxxx>
> > > 
> > > 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
>From eb76d1e31e2da419a66e16f90504ac3f8cdb6874 Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
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@xxxxxx>
Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>

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,

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux