Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-19 Thread Koul, Vinod
On Tue, 2011-08-16 at 20:21 +0530, Jassi Brar wrote: > On Tue, Aug 16, 2011 at 5:25 PM, Koul, Vinod wrote: > > > Sorry I still don't get this schema and how it can be scaled and be > > generic enough to let it carry with various implementations. > > > > Can you publish your complete idea rather

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-16 Thread Jassi Brar
On Tue, Aug 16, 2011 at 5:25 PM, Koul, Vinod wrote: >> >> > The lookup of a device DMA channel should follow the >> >> > design pattern set by regulators and clocks. >> >> Nopes. It depends upon the subsystem. >> >> We should strive towards making this scheme as 'standalone' as >> >> possible. >>

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-16 Thread Koul, Vinod
On Thu, 2011-08-11 at 00:29 +0530, Jassi Brar wrote: > On Thu, Aug 11, 2011 at 2:28 AM, Vinod Koul wrote: > >> > The lookup of a device DMA channel should follow the > >> > design pattern set by regulators and clocks. > >> Nopes. It depends upon the subsystem. > >> We should strive towards making

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-11 Thread Jassi Brar
On Thu, Aug 11, 2011 at 8:18 PM, Linus Walleij wrote: > 2011/8/11 Jassi Brar : > >> Do you have any reason for using device pointer and strings, other >> than just "because clock and regulator use them" ?? > > Basically no. Dear, I am speechless !! Best of luck. Do you propose to implement

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-11 Thread Koul, Vinod
On Thu, 2011-08-11 at 16:48 +0200, Linus Walleij wrote: > 2011/8/11 Jassi Brar : > > > Do you have any reason for using device pointer and strings, other > > than just "because clock and regulator use them" ?? > > Basically no. > > But I think these frameworks are very workable and proven > to w

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-11 Thread Linus Walleij
2011/8/11 Jassi Brar : > Do you have any reason for using device pointer and strings, other > than just "because clock and regulator use them" ?? Basically no. But I think these frameworks are very workable and proven to work in practice. So I like them. When setting up the platform the coder w

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-11 Thread Jassi Brar
On Thu, Aug 11, 2011 at 6:25 PM, Linus Walleij wrote: > 2011/8/10 Jassi Brar : >> On Wed, Aug 10, 2011 at 5:24 PM, Linus Walleij >> wrote: Linus W, was there anything you said wouldn't work with the scheme ? Please tell now on the record. >>> >>> It would *work* but the current proposa

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-11 Thread Linus Walleij
2011/8/10 Jassi Brar : > On Wed, Aug 10, 2011 at 5:24 PM, Linus Walleij > wrote: >>> Linus W, was there anything you said wouldn't work with the scheme ? >>> Please tell now on the record. >> >> It would *work* but the current proposal is *not elegant* IMO. > > would *work*  -> You could find no

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Jassi Brar
On Thu, Aug 11, 2011 at 2:28 AM, Vinod Koul wrote: >> > The lookup of a device DMA channel should follow the >> > design pattern set by regulators and clocks. >> Nopes. It depends upon the subsystem. >> We should strive towards making this scheme as 'standalone' as >> possible. >> Client having to

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Vinod Koul
On Wed, 2011-08-10 at 18:46 +0530, Jassi Brar wrote: > On Wed, Aug 10, 2011 at 5:24 PM, Linus Walleij > wrote: > > On Wed, Aug 10, 2011 at 1:24 PM, Jassi Brar > > wrote: > >> On Wed, Aug 10, 2011 at 4:10 PM, Russell King - ARM Linux > >>> > >>> I discussed this with Linus on the bus back from C

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Jassi Brar
On Wed, Aug 10, 2011 at 5:24 PM, Linus Walleij wrote: > On Wed, Aug 10, 2011 at 1:24 PM, Jassi Brar wrote: >> On Wed, Aug 10, 2011 at 4:10 PM, Russell King - ARM Linux >>> >>> I discussed this with Linus on the bus back from Cambridge in the evening, >>> and it appears that the story you gave me

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Linus Walleij
On Wed, Aug 10, 2011 at 1:24 PM, Jassi Brar wrote: > On Wed, Aug 10, 2011 at 4:10 PM, Russell King - ARM Linux >> >> I discussed this with Linus on the bus back from Cambridge in the evening, >> and it appears that the story you gave me was inaccurate - Linus had not >> agreed to your proposal and

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Jassi Brar
On Wed, Aug 10, 2011 at 4:10 PM, Russell King - ARM Linux wrote: > On Wed, Aug 10, 2011 at 04:01:13PM +0530, Jassi Brar wrote: >> On Wed, Aug 10, 2011 at 3:31 PM, Koul, Vinod wrote: >> > On Wed, 2011-08-10 at 14:59 +0530, viresh kumar wrote: >> >> On 08/10/2011 02:30 PM, Russell King - ARM Linux

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Koul, Vinod
On Wed, 2011-08-10 at 11:32 +0100, Russell King - ARM Linux wrote: > On Wed, Aug 10, 2011 at 03:44:13PM +0530, viresh kumar wrote: > > On 08/10/2011 03:31 PM, Koul, Vinod wrote: > > > And on your patch, are you able to dynamically assign the channels for > > > platform? What is the intended usage?

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Jassi Brar
On Wed, Aug 10, 2011 at 4:00 PM, Russell King - ARM Linux wrote: > On Wed, Aug 10, 2011 at 03:39:28PM +0530, Jassi Brar wrote: >> On Wed, Aug 10, 2011 at 2:59 PM, viresh kumar wrote: >> > On 08/10/2011 02:30 PM, Russell King - ARM Linux wrote: >> >>> > They must be allocated when they are require

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Russell King - ARM Linux
On Wed, Aug 10, 2011 at 04:01:13PM +0530, Jassi Brar wrote: > On Wed, Aug 10, 2011 at 3:31 PM, Koul, Vinod wrote: > > On Wed, 2011-08-10 at 14:59 +0530, viresh kumar wrote: > >> On 08/10/2011 02:30 PM, Russell King - ARM Linux wrote: > >> >> > They must be allocated when they are required and must

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Russell King - ARM Linux
On Wed, Aug 10, 2011 at 03:44:13PM +0530, viresh kumar wrote: > On 08/10/2011 03:31 PM, Koul, Vinod wrote: > > And on your patch, are you able to dynamically assign the channels for > > platform? What is the intended usage? (as Russell articulated it is bad > > to dynamically assign channel for som

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Jassi Brar
On Wed, Aug 10, 2011 at 3:31 PM, Koul, Vinod wrote: > On Wed, 2011-08-10 at 14:59 +0530, viresh kumar wrote: >> On 08/10/2011 02:30 PM, Russell King - ARM Linux wrote: >> >> > They must be allocated when they are required and must be freed after >> >> > we are >> >> > done with transfers. So that

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Russell King - ARM Linux
On Wed, Aug 10, 2011 at 03:39:28PM +0530, Jassi Brar wrote: > On Wed, Aug 10, 2011 at 2:59 PM, viresh kumar wrote: > > On 08/10/2011 02:30 PM, Russell King - ARM Linux wrote: > >>> > They must be allocated when they are required and must be freed after > >>> > we are > >>> > done with transfers.

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Russell King - ARM Linux
On Wed, Aug 10, 2011 at 03:31:42PM +0530, Koul, Vinod wrote: > I would agree on both counts :) > > In some cases it does make sense to hold the channel for the lifetime > like uart or where the channel has been tied to an interface by SoC > designer. > But in some cases like dw_dmac it seems you c

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread viresh kumar
On 08/10/2011 03:31 PM, Koul, Vinod wrote: > And on your patch, are you able to dynamically assign the channels for > platform? What is the intended usage? (as Russell articulated it is bad > to dynamically assign channel for something like uart) Are you talking about channels or DMA request lines

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Jassi Brar
On Wed, Aug 10, 2011 at 2:59 PM, viresh kumar wrote: > On 08/10/2011 02:30 PM, Russell King - ARM Linux wrote: >>> > They must be allocated when they are required and must be freed after we >>> > are >>> > done with transfers. So that they can be used by other users. >> Which DMA engine driver re

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Koul, Vinod
On Wed, 2011-08-10 at 14:59 +0530, viresh kumar wrote: > On 08/10/2011 02:30 PM, Russell King - ARM Linux wrote: > >> > They must be allocated when they are required and must be freed after we > >> > are > >> > done with transfers. So that they can be used by other users. > > Which DMA engine driv

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread viresh kumar
On 08/10/2011 02:30 PM, Russell King - ARM Linux wrote: >> > They must be allocated when they are required and must be freed after we >> > are >> > done with transfers. So that they can be used by other users. > Which DMA engine driver requires this? > dw_dmac.c > Normally, when we have DMA eng

Re: [PATCH V2 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-10 Thread Russell King - ARM Linux
On Wed, Aug 10, 2011 at 02:20:59PM +0530, Viresh Kumar wrote: > Currently we request DMA channels at probe time and free them at remove. They > are always occupied, irrespective of their usage. > > They must be allocated when they are required and must be freed after we are > done with transfers.