OMAP: sDMA: Correct the the omap_request_dma_chain() signature
Subsystems (2)
PATCH 1/1 OMAP: sDMA: Correct the the omap_request_dma_chain() signature
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
--- arch/arm/plat-omap/dma.c | 2 +- arch/arm/plat-omap/include/mach/dma.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/dma.c +1 -1
@@ -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)
arch/arm/plat-omap/include/mach/dma.h +1 -1
@@ -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,
Signature · 1 line
1.5.4.7
Quoted 10 lines · On Wed, 29 Apr 2009 17:39:16 +0530 Santosh Shilimkar…
Original OMAP DMA chaining design has
chain_idas 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 notchain_id. Hence the signature of theomap_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.
Signature · 1 line
Jarkko
Quoted 28 lines
-----Original Message-----
From: Jarkko Nikula [mailto:[email protected]]
Sent: Thursday, April 30, 2009 12:38 AM
To: Shilimkar, Santosh
Cc: [email protected]
Subject: Re: [PATCH] OMAP: sDMA: Correct the theomap_request_dma_chain()signatureQuoted 1 line · On Wed, 29 Apr 2009 17:39:16 +0530 Santosh Shilimkar…
Original OMAP DMA chaining design has
chain_idas one ofthe callback
Quoted 2 lines
parameters. The below patch broke the desing.
http://git.omapzoom.org/?p=repo/omapkernel.git;a=commitdiff;h=
538528de0cb256f65716ab2e9613d9e920f97fe2Quoted 7 lines
Now callback returns logical channel number and not
chain_id. Hence the signature of theomap_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=2Thanks! And this thread where I promised to send a patch but never done
it...
Quoted 5 lines
http://marc.info/?l=linux-omap&m=122770291205164&w=2
Two comments:
"Now callback returns logical channel number and notchain_id. " You mean callback gets lch instead ofchain_idas an argument?
Yes.
Quoted 2 lines
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
Regards,
Santosh
Quoted 41 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Shilimkar, Santosh
Sent: Thursday, April 30, 2009 10:02 AM
To: Jarkko Nikula
Cc: [email protected]
Subject: RE: [PATCH] OMAP: sDMA: Correct the theomap_request_dma_chain()signatureQuoted 11 lines
-----Original Message-----
From: Jarkko Nikula [mailto:[email protected]]
Sent: Thursday, April 30, 2009 12:38 AM
To: Shilimkar, Santosh
Cc: [email protected]
Subject: Re: [PATCH] OMAP: sDMA: Correct the theomap_request_dma_chain()signatureOn Wed, 29 Apr 2009 17:39:16 +0530
Santosh Shilimkar <[email protected]> wrote:Quoted 8 lines
Quoted 1 line
Original OMAP DMA chaining design has
chain_idas one ofthe callback
Quoted 2 lines
parameters. The below patch broke the desing.
http://git.omapzoom.org/?p=repo/omapkernel.git;a=commitdiff;h=
538528de0cb256f65716ab2e9613d9e920f97fe2Quoted 2 lines
Now callback returns logical channel number and not
chain_id. Hence the signature of theomap_request_dma_chain()functions needs
Quoted 11 lines
Quoted 5 lines
to be corrected to avoid any confusion.
More details are on this email thread :
http://marc.info/?l=linux-omap&m=122961071931459&w=2Thanks! And this thread where I promised to send a patch but never done
it...
Quoted 7 lines
Quoted 3 lines
Two comments:
"Now callback returns logical channel number and notchain_id. " You mean callback gets lch instead ofchain_idas an argument?Yes.
Quoted 2 lines
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.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Yor tow comments....I think I answered both.....Just a correction you comment itself.
Quoted 1 line
Quoted 1 line
You mean callback gets lch instead of
chain_idas 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
A message that is not in the archive (sent off-list or not yet received): [email protected]
________________________________
From: Jarkko Nikula [mailto:[email protected]]
Sent: Thursday, April 30, 2009 3:06 PM
To: Shilimkar, Santosh
Cc: [email protected]
Subject: Re: [PATCH] OMAP: sDMA: Correct the the omap_request_dma_chain() signature
On Thu, Apr 30, 2009 at 12:18 PM, Shilimkar, Santosh <[email protected]> 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.
Tony,
Can you merge this.
Regards,
Santosh
Quoted 50 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Shilimkar, Santosh
Sent: Thursday, April 30, 2009 3:15 PM
To: Jarkko Nikula
Cc: [email protected]
Subject: RE: [PATCH] OMAP: sDMA: Correct the theomap_request_dma_chain()signature________________________________
From: Jarkko Nikula [mailto:[email protected]]
Sent: Thursday, April 30, 2009 3:06 PM
To: Shilimkar, Santosh
Cc: [email protected]
Subject: Re: [PATCH] OMAP: sDMA: Correct the theomap_request_dma_chain()signatureOn Thu, Apr 30, 2009 at 12:18 PM, Shilimkar, Santosh<[email protected]> wrote:
Yor tow comments....I think I answered
both.....Just a correction you comment itself.> > You mean callback gets lch instead of
chain_idas an argument?You mean callback **** returns *** lch instead
ofchain_idas 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 notchain_id. So User will get the channel number and notchain_idvia callback.
PATCH 1/1 OMAP: sDMA: Correct the the
In reply to Santosh ShilimkarThis 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