All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP: sDMA: Correct the the omap_request_dma_chain() signature
@ 2009-04-29 12:09 Santosh Shilimkar
  2009-04-29 19:08 ` Jarkko Nikula
  2009-05-18 21:26 ` [APPLIED] [PATCH] OMAP: sDMA: Correct the the Tony Lindgren
  0 siblings, 2 replies; 8+ messages in thread
From: Santosh Shilimkar @ 2009-04-29 12:09 UTC (permalink / raw)
  To: linux-omap; +Cc: Santosh Shilimkar

Original OMAP DMA chaining design has chain_id as one of the callback
parameters. The below patch broke the desing.
http://git.omapzoom.org/?p=repo/omapkernel.git;a=commitdiff;h=538528de0cb256f65716ab2e9613d9e920f97fe2
Now callback returns logical channel number and not chain_id. 
Hence the signature of the omap_request_dma_chain() functions needs to be
corrected to avoid any confusion.

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>
---
 arch/arm/plat-omap/dma.c              |    2 +-
 arch/arm/plat-omap/include/mach/dma.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 6093018..fcc6f69 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -1199,7 +1199,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 224b077..2d5af41 100644
--- a/arch/arm/plat-omap/include/mach/dma.h
+++ b/arch/arm/plat-omap/include/mach/dma.h
@@ -546,7 +546,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,
-- 
1.5.4.7


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

* Re: [PATCH] OMAP: sDMA: Correct the the omap_request_dma_chain() signature
  2009-04-29 12:09 [PATCH] OMAP: sDMA: Correct the the omap_request_dma_chain() signature Santosh Shilimkar
@ 2009-04-29 19:08 ` Jarkko Nikula
  2009-04-30  4:32   ` Shilimkar, Santosh
  2009-05-18 21:26 ` [APPLIED] [PATCH] OMAP: sDMA: Correct the the Tony Lindgren
  1 sibling, 1 reply; 8+ messages in thread
From: Jarkko Nikula @ 2009-04-29 19:08 UTC (permalink / raw)
  To: Santosh Shilimkar; +Cc: linux-omap

On Wed, 29 Apr 2009 17:39:16 +0530
Santosh Shilimkar <santosh.shilimkar@ti.com> wrote:

> Original OMAP DMA chaining design has chain_id as one of the callback
> parameters. The below patch broke the desing.
> http://git.omapzoom.org/?p=repo/omapkernel.git;a=commitdiff;h=538528de0cb256f65716ab2e9613d9e920f97fe2
> Now callback returns logical channel number and not chain_id. 
> Hence the signature of the omap_request_dma_chain() functions needs
> to be corrected to avoid any confusion.
> 
> More details are on this email thread :
> http://marc.info/?l=linux-omap&m=122961071931459&w=2
> 
Thanks! And this thread where I promised to send a patch but never done
it...

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

Two comments:
"Now callback returns logical channel number and not chain_id. "
You mean callback gets lch instead of chain_id as an argument?

Change also kernel-doc function comment for omap_request_dma_chain.
I.e. those comment lines few lines before the function itself.

-- 
Jarkko

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

* RE: [PATCH] OMAP: sDMA: Correct the the omap_request_dma_chain() signature
  2009-04-29 19:08 ` Jarkko Nikula
@ 2009-04-30  4:32   ` Shilimkar, Santosh
  2009-04-30  4:48     ` Shilimkar, Santosh
  0 siblings, 1 reply; 8+ messages in thread
From: Shilimkar, Santosh @ 2009-04-30  4:32 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: linux-omap@vger.kernel.org

> -----Original Message-----
> From: Jarkko Nikula [mailto:jhnikula@gmail.com] 
> Sent: Thursday, April 30, 2009 12:38 AM
> To: Shilimkar, Santosh
> Cc: linux-omap@vger.kernel.org
> Subject: Re: [PATCH] OMAP: sDMA: Correct the the 
> omap_request_dma_chain() signature
> 
> On Wed, 29 Apr 2009 17:39:16 +0530
> Santosh Shilimkar <santosh.shilimkar@ti.com> wrote:
> 
> > Original OMAP DMA chaining design has chain_id as one of 
> the callback
> > parameters. The below patch broke the desing.
> > 
> http://git.omapzoom.org/?p=repo/omapkernel.git;a=commitdiff;h=
> 538528de0cb256f65716ab2e9613d9e920f97fe2
> > Now callback returns logical channel number and not chain_id. 
> > Hence the signature of the omap_request_dma_chain() functions needs
> > to be corrected to avoid any confusion.
> > 
> > More details are on this email thread :
> > http://marc.info/?l=linux-omap&m=122961071931459&w=2
> > 
> Thanks! And this thread where I promised to send a patch but 
> never done
> it...
> 
> http://marc.info/?l=linux-omap&m=122770291205164&w=2
> 
> Two comments:
> "Now callback returns logical channel number and not chain_id. "
> You mean callback gets lch instead of chain_id as an argument?
Yes.
> Change also kernel-doc function comment for omap_request_dma_chain.
> I.e. those comment lines few lines before the function itself.
Yes would do that and send the patch.

Regards,
Santosh

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

* RE: [PATCH] OMAP: sDMA: Correct the the omap_request_dma_chain() signature
  2009-04-30  4:32   ` Shilimkar, Santosh
@ 2009-04-30  4:48     ` Shilimkar, Santosh
       [not found]       ` <bd7b27490904300146p17cb127asf2013cc3f0840a26@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Shilimkar, Santosh @ 2009-04-30  4:48 UTC (permalink / raw)
  To: Shilimkar, Santosh, Jarkko Nikula; +Cc: linux-omap@vger.kernel.org



Regards,
Santosh
 

> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org 
> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of 
> Shilimkar, Santosh
> Sent: Thursday, April 30, 2009 10:02 AM
> To: Jarkko Nikula
> Cc: linux-omap@vger.kernel.org
> Subject: RE: [PATCH] OMAP: sDMA: Correct the the 
> omap_request_dma_chain() signature
> 
> > -----Original Message-----
> > From: Jarkko Nikula [mailto:jhnikula@gmail.com] 
> > Sent: Thursday, April 30, 2009 12:38 AM
> > To: Shilimkar, Santosh
> > Cc: linux-omap@vger.kernel.org
> > Subject: Re: [PATCH] OMAP: sDMA: Correct the the 
> > omap_request_dma_chain() signature
> > 
> > On Wed, 29 Apr 2009 17:39:16 +0530
> > Santosh Shilimkar <santosh.shilimkar@ti.com> wrote:
> > 
> > > Original OMAP DMA chaining design has chain_id as one of 
> > the callback
> > > parameters. The below patch broke the desing.
> > > 
> > http://git.omapzoom.org/?p=repo/omapkernel.git;a=commitdiff;h=
> > 538528de0cb256f65716ab2e9613d9e920f97fe2
> > > Now callback returns logical channel number and not chain_id. 
> > > Hence the signature of the omap_request_dma_chain() 
> functions needs
> > > to be corrected to avoid any confusion.
> > > 
> > > More details are on this email thread :
> > > http://marc.info/?l=linux-omap&m=122961071931459&w=2
> > > 
> > Thanks! And this thread where I promised to send a patch but 
> > never done
> > it...
> > 
> > http://marc.info/?l=linux-omap&m=122770291205164&w=2
> > 
> > Two comments:
> > "Now callback returns logical channel number and not chain_id. "
> > You mean callback gets lch instead of chain_id as an argument?
> Yes.
> > Change also kernel-doc function comment for omap_request_dma_chain.
> > I.e. those comment lines few lines before the function itself.
> Yes would do that and send the patch.
There is no change needed in the documentation part since there is no description about the callback parameters.
/**
 * @brief omap_request_dma_chain : Request a chain of DMA channels
 *
 * @param dev_id - Device id using the dma channel
 * @param dev_name - Device name
 * @param callback - Call back function
 * @chain_id -
 * @no_of_chans - Number of channels requested
 * @chain_mode - Dynamic or static chaining : OMAP_DMA_STATIC_CHAIN
 * 					      OMAP_DMA_DYNAMIC_CHAIN
 * @params - Channel parameters
 *
 * @return - Succes : 0
 * 	     Failure: -EINVAL/-ENOMEM
 */
int omap_request_dma_chain(int dev_id, const char *dev_name,
			   void (*callback) (int chain_id, u16 ch_status,
					     void *data),
			   int *chain_id, int no_of_chans, int chain_mode,
			   struct omap_dma_channel_params params)
{

So no need to change the patch.


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

* RE: [PATCH] OMAP: sDMA: Correct the the omap_request_dma_chain() signature
       [not found]       ` <bd7b27490904300146p17cb127asf2013cc3f0840a26@mail.gmail.com>
@ 2009-04-30  9:18         ` Shilimkar, Santosh
       [not found]           ` <bd7b27490904300236q458b8198x200a976b9941dc10@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Shilimkar, Santosh @ 2009-04-30  9:18 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: linux-omap@vger.kernel.org

 Yor tow comments....I think I answered both.....Just a correction you comment itself.

> > You mean callback gets lch instead of chain_id as an argument?
You mean callback **** returns *** lch instead of chain_id as an argument?



		> > Two comments:
		> > "Now callback returns logical channel number and not chain_id. "
		> > You mean callback gets lch instead of chain_id as an argument?
		> Yes.


	Comment below.
	  
	


		> > Change also kernel-doc function comment for omap_request_dma_chain.
		> > I.e. those comment lines few lines before the function itself.
		> Yes would do that and send the patch.

________________________________
Regards
Santosh

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

* RE: [PATCH] OMAP: sDMA: Correct the the omap_request_dma_chain() signature
       [not found]           ` <bd7b27490904300236q458b8198x200a976b9941dc10@mail.gmail.com>
@ 2009-04-30  9:44             ` Shilimkar, Santosh
  2009-05-13 10:12               ` Shilimkar, Santosh
  0 siblings, 1 reply; 8+ messages in thread
From: Shilimkar, Santosh @ 2009-04-30  9:44 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: linux-omap@vger.kernel.org

________________________________

From: Jarkko Nikula [mailto:jhnikula@gmail.com] 
Sent: Thursday, April 30, 2009 3:06 PM
To: Shilimkar, Santosh
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] OMAP: sDMA: Correct the the omap_request_dma_chain() signature



	On Thu, Apr 30, 2009 at 12:18 PM, Shilimkar, Santosh <santosh.shilimkar@ti.com> wrote:
	

		 Yor tow comments....I think I answered both.....Just a correction you comment itself.
		

		> > You mean callback gets lch instead of chain_id as an argument?
		
		You mean callback **** returns *** lch instead of chain_id as an argument?
		



	I mean argument passed to the callback. Callback is void so not returning anything.
	
	        if (likely(dma_chan[ch].callback != NULL))
	                dma_chan[ch].callback(ch, status, dma_chan[ch].data);

	My ***return ** was from the dma user point of view and not the fucntion return :). Anyway the point is callback first argument is dma channel nubmer and not chain_id. So User will get the channel number and not chain_id via callback.
	


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

* RE: [PATCH] OMAP: sDMA: Correct the the omap_request_dma_chain() signature
  2009-04-30  9:44             ` Shilimkar, Santosh
@ 2009-05-13 10:12               ` Shilimkar, Santosh
  0 siblings, 0 replies; 8+ messages in thread
From: Shilimkar, Santosh @ 2009-05-13 10:12 UTC (permalink / raw)
  To: Shilimkar, Santosh; +Cc: linux-omap@vger.kernel.org

Tony,

Can you merge this.

Regards,
Santosh
 

> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org 
> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of 
> Shilimkar, Santosh
> Sent: Thursday, April 30, 2009 3:15 PM
> To: Jarkko Nikula
> Cc: linux-omap@vger.kernel.org
> Subject: RE: [PATCH] OMAP: sDMA: Correct the the 
> omap_request_dma_chain() signature
> 
> ________________________________
> 
> From: Jarkko Nikula [mailto:jhnikula@gmail.com] 
> Sent: Thursday, April 30, 2009 3:06 PM
> To: Shilimkar, Santosh
> Cc: linux-omap@vger.kernel.org
> Subject: Re: [PATCH] OMAP: sDMA: Correct the the 
> omap_request_dma_chain() signature
> 
> 
> 
> 	On Thu, Apr 30, 2009 at 12:18 PM, Shilimkar, Santosh 
> <santosh.shilimkar@ti.com> wrote:
> 	
> 
> 		 Yor tow comments....I think I answered 
> both.....Just a correction you comment itself.
> 		
> 
> 		> > You mean callback gets lch instead of 
> chain_id as an argument?
> 		
> 		You mean callback **** returns *** lch instead 
> of chain_id as an argument?
> 		
> 
> 
> 
> 	I mean argument passed to the callback. Callback is 
> void so not returning anything.
> 	
> 	        if (likely(dma_chan[ch].callback != NULL))
> 	                dma_chan[ch].callback(ch, status, 
> dma_chan[ch].data);
> 
> 	My ***return ** was from the dma user point of view and 
> not the fucntion return :). Anyway the point is callback 
> first argument is dma channel nubmer and not chain_id. So 
> User will get the channel number and not chain_id via callback.
> 	

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

* [APPLIED]  [PATCH] OMAP: sDMA: Correct the the
  2009-04-29 12:09 [PATCH] OMAP: sDMA: Correct the the omap_request_dma_chain() signature Santosh Shilimkar
  2009-04-29 19:08 ` Jarkko Nikula
@ 2009-05-18 21:26 ` Tony Lindgren
  1 sibling, 0 replies; 8+ messages in thread
From: Tony Lindgren @ 2009-05-18 21:26 UTC (permalink / raw)
  To: linux-omap

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Initial commit ID (Likely to change): 0b2ce840c9fb58cf489bfdfc2d77f99a09a5dca3

PatchWorks
http://patchwork.kernel.org/patch/20665/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=0b2ce840c9fb58cf489bfdfc2d77f99a09a5dca3



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

end of thread, other threads:[~2009-05-18 21:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-29 12:09 [PATCH] OMAP: sDMA: Correct the the omap_request_dma_chain() signature Santosh Shilimkar
2009-04-29 19:08 ` Jarkko Nikula
2009-04-30  4:32   ` Shilimkar, Santosh
2009-04-30  4:48     ` Shilimkar, Santosh
     [not found]       ` <bd7b27490904300146p17cb127asf2013cc3f0840a26@mail.gmail.com>
2009-04-30  9:18         ` Shilimkar, Santosh
     [not found]           ` <bd7b27490904300236q458b8198x200a976b9941dc10@mail.gmail.com>
2009-04-30  9:44             ` Shilimkar, Santosh
2009-05-13 10:12               ` Shilimkar, Santosh
2009-05-18 21:26 ` [APPLIED] [PATCH] OMAP: sDMA: Correct the the Tony Lindgren

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.