public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: "Shilimkar, Santosh" <santosh.shilimkar@ti.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	"linux-arm-kernel@lists.arm.linux.org.uk"
	<linux-arm-kernel@lists.arm.linux.org.uk>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 07/10] ARM: OMAP2/3: sDMA: Correct omap_request_dma_chain(), v2
Date: Mon, 25 May 2009 09:28:57 -0700	[thread overview]
Message-ID: <20090525162857.GC29933@atomide.com> (raw)
In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB02B4B338A3@dbde02.ent.ti.com>

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

* 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

[-- Attachment #2: dma-chaining-v2.patch --]
[-- Type: text/x-diff, Size: 1869 bytes --]

>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,

  reply	other threads:[~2009-05-25 16:29 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19 23:30 [PATCH 00/10] Omap updates for merge window after 2.6.30 Tony Lindgren
2009-05-19 23:32 ` [PATCH 01/10] ARM: OMAP: Increase VMALLOC_END to allow 256MB RAM Tony Lindgren
2009-05-19 23:33 ` [PATCH 02/10] ARM: OMAP: McBSP: Fix legacy interrupts to clear their status Tony Lindgren
2009-05-19 23:34 ` [PATCH 03/10] ARM: OMAP: Update contact address of I2C registration helper Tony Lindgren
2009-05-25  9:23   ` Russell King - ARM Linux
2009-05-25 11:32     ` Jarkko Nikula
2009-05-25 16:23       ` Tony Lindgren
2009-05-19 23:36 ` [PATCH 04/10] ARM: OMAP1: Misc clean-up Tony Lindgren
2009-05-19 23:37 ` [PATCH 05/10] ARM: OMAP1: Make 770 LCD work Tony Lindgren
2009-05-25  9:29   ` Russell King - ARM Linux
2009-05-25 13:21     ` Andrew de Quincey
2009-05-25 16:40       ` Andrew de Quincey
2009-05-28 18:20         ` Tony Lindgren
2009-05-28 18:44           ` Andrew de Quincey
2009-05-28 19:11             ` [PATCH 05/10] ARM: OMAP1: Make 770 LCD work, v2 Tony Lindgren
2009-05-28 21:03               ` [PATCH 05/10] ARM: OMAP1: Make 770 LCD work, v3 Tony Lindgren
2009-05-28 19:50           ` [PATCH 05/10] ARM: OMAP1: Make 770 LCD work Russell King - ARM Linux
2009-05-29  0:29             ` Andrew de Quincey
2009-06-01 13:57               ` Kalle Valo
2009-05-28 19:53           ` Russell King - ARM Linux
2009-05-28 21:02             ` [PATCH] ARM: Move clk_add_alias() to arch/arm/common/clkdev.c (Re: [PATCH 05/10] ARM: OMAP1: Make 770 LCD work) Tony Lindgren
2009-06-03 16:44               ` Tony Lindgren
2009-05-19 23:38 ` [PATCH 06/10] ARM: OMAP2/3: DMA: implement trans copy and const fill Tony Lindgren
2009-05-19 23:40 ` [PATCH 07/10] ARM: OMAP2/3: sDMA: Correct omap_request_dma_chain() Tony Lindgren
2009-05-25  9:34   ` Russell King - ARM Linux
2009-05-25  9:40     ` Shilimkar, Santosh
2009-05-25 16:28       ` Tony Lindgren [this message]
2009-05-26  4:55         ` [PATCH 07/10] ARM: OMAP2/3: sDMA: Correct omap_request_dma_chain(), v2 Shilimkar, Santosh
2009-05-19 23:41 ` [PATCH 08/10] ARM: OMAP2/3: Add generic onenand support when connected to GPMC Tony Lindgren
2009-05-25  9:43   ` Russell King - ARM Linux
2009-05-25 16:50     ` [PATCH 08/10] ARM: OMAP2/3: Add generic onenand support when connected to GPMC, v2 Tony Lindgren
2009-05-19 23:42 ` [PATCH 09/10] ARM: OMAP2/3: Add generic smc91x support when connected to GPMC Tony Lindgren
2009-05-25  9:46   ` Russell King - ARM Linux
2009-05-25 16:59     ` [PATCH 09/10] ARM: OMAP2/3: Add generic smc91x support when connected to GPMC, v2 Tony Lindgren
2009-05-19 23:44 ` [PATCH 10/10] ARM: OMAP2: 2430SDP: Add FB support to board file Tony Lindgren
2009-05-25 17:42   ` [PATCH 11/10] ARM: OMAP: Add some entries to MAINTAINERS Tony Lindgren
2009-05-26 23:18 ` [PATCH 00/10] Omap updates for merge window after 2.6.30 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=20090525162857.GC29933@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=santosh.shilimkar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox