Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-16 Thread Baolin Wang
On 16 April 2018 at 23:35, Vinod Koul wrote: > On Mon, Apr 16, 2018 at 02:32:05PM +0800, Baolin Wang wrote: > >> >> Beside the general configuration, our audio driver will configure the >> >> fragment length, block length, maybe transaction length, and they must >> >> specify the request type and

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-16 Thread Vinod Koul
On Mon, Apr 16, 2018 at 02:32:05PM +0800, Baolin Wang wrote: > >> Beside the general configuration, our audio driver will configure the > >> fragment length, block length, maybe transaction length, and they must > >> specify the request type and interrupt type, these are what we want to > >> expor

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-15 Thread Baolin Wang
On 16 April 2018 at 11:58, Vinod Koul wrote: > On Fri, Apr 13, 2018 at 02:41:48PM +0800, Baolin Wang wrote: >> On 13 April 2018 at 14:36, Vinod Koul wrote: >> > On Fri, Apr 13, 2018 at 02:17:34PM +0800, Baolin Wang wrote: >> > >> >> > Agreed, users only care about grabbing a channel, setting a de

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-15 Thread Vinod Koul
On Fri, Apr 13, 2018 at 02:41:48PM +0800, Baolin Wang wrote: > On 13 April 2018 at 14:36, Vinod Koul wrote: > > On Fri, Apr 13, 2018 at 02:17:34PM +0800, Baolin Wang wrote: > > > >> > Agreed, users only care about grabbing a channel, setting a descriptor > >> > and > >> > submitting that. > >> >

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-13 Thread Baolin Wang
On 13 April 2018 at 18:11, Vinod Koul wrote: > On Fri, Apr 13, 2018 at 02:41:48PM +0800, Baolin Wang wrote: >> On 13 April 2018 at 14:36, Vinod Koul wrote: >> > On Fri, Apr 13, 2018 at 02:17:34PM +0800, Baolin Wang wrote: >> > >> >> > Agreed, users only care about grabbing a channel, setting a de

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-13 Thread Vinod Koul
On Fri, Apr 13, 2018 at 02:41:48PM +0800, Baolin Wang wrote: > On 13 April 2018 at 14:36, Vinod Koul wrote: > > On Fri, Apr 13, 2018 at 02:17:34PM +0800, Baolin Wang wrote: > > > >> > Agreed, users only care about grabbing a channel, setting a descriptor > >> > and > >> > submitting that. > >> >

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-12 Thread Baolin Wang
On 13 April 2018 at 14:36, Vinod Koul wrote: > On Fri, Apr 13, 2018 at 02:17:34PM +0800, Baolin Wang wrote: > >> > Agreed, users only care about grabbing a channel, setting a descriptor and >> > submitting that. >> > >> > I think you need to go back and think about this a bit, please do go thru >>

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-12 Thread Vinod Koul
On Fri, Apr 13, 2018 at 02:17:34PM +0800, Baolin Wang wrote: > > Agreed, users only care about grabbing a channel, setting a descriptor and > > submitting that. > > > > I think you need to go back and think about this a bit, please do go thru > > dmaengine documentation and see other driver exampl

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-12 Thread Baolin Wang
On 13 April 2018 at 11:43, Vinod Koul wrote: > On Thu, Apr 12, 2018 at 07:36:34PM +0800, Baolin Wang wrote: >> >>> >> +/* >> >>> >> + * struct sprd_dma_config - DMA configuration structure >> >>> >> + * @config: dma slave channel config >> >>> >> + * @fragment_len: specify one fragment transfer le

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-12 Thread Baolin Wang
On 13 April 2018 at 11:39, Vinod Koul wrote: > On Thu, Apr 12, 2018 at 07:30:01PM +0800, Baolin Wang wrote: > >> >> > what does block and transaction len refer to here >> >> >> >> Our DMA has 3 transfer mode: transaction transfer, block transfer and >> >> fragment transfer. One transaction transf

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-12 Thread Vinod Koul
On Thu, Apr 12, 2018 at 07:36:34PM +0800, Baolin Wang wrote: > >>> >> +/* > >>> >> + * struct sprd_dma_config - DMA configuration structure > >>> >> + * @config: dma slave channel config > >>> >> + * @fragment_len: specify one fragment transfer length > >>> >> + * @block_len: specify one block tran

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-12 Thread Vinod Koul
On Thu, Apr 12, 2018 at 07:30:01PM +0800, Baolin Wang wrote: > >> > what does block and transaction len refer to here > >> > >> Our DMA has 3 transfer mode: transaction transfer, block transfer and > >> fragment transfer. One transaction transfer can contain several blocks > >> transfer, and each

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-12 Thread Baolin Wang
On 12 April 2018 at 19:30, Baolin Wang wrote: > Hi Vinod, > > On 12 April 2018 at 17:37, Vinod Koul wrote: >> On Wed, Apr 11, 2018 at 08:13:28PM +0800, Baolin Wang wrote: >>> Hi Vinod, >>> >>> On 11 April 2018 at 17:36, Vinod Koul wrote: >>> > On Tue, Apr 10, 2018 at 03:46:06PM +0800, Baolin Wan

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-12 Thread Baolin Wang
Hi Vinod, On 12 April 2018 at 17:37, Vinod Koul wrote: > On Wed, Apr 11, 2018 at 08:13:28PM +0800, Baolin Wang wrote: >> Hi Vinod, >> >> On 11 April 2018 at 17:36, Vinod Koul wrote: >> > On Tue, Apr 10, 2018 at 03:46:06PM +0800, Baolin Wang wrote: >> > >> >> +/* >> >> + * struct sprd_dma_config

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-12 Thread Vinod Koul
On Wed, Apr 11, 2018 at 08:13:28PM +0800, Baolin Wang wrote: > Hi Vinod, > > On 11 April 2018 at 17:36, Vinod Koul wrote: > > On Tue, Apr 10, 2018 at 03:46:06PM +0800, Baolin Wang wrote: > > > >> +/* > >> + * struct sprd_dma_config - DMA configuration structure > >> + * @config: dma slave channel

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-11 Thread Baolin Wang
Hi Vinod, On 11 April 2018 at 17:36, Vinod Koul wrote: > On Tue, Apr 10, 2018 at 03:46:06PM +0800, Baolin Wang wrote: > >> +/* >> + * struct sprd_dma_config - DMA configuration structure >> + * @config: dma slave channel config >> + * @fragment_len: specify one fragment transfer length >> + * @bl

Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-11 Thread Vinod Koul
On Tue, Apr 10, 2018 at 03:46:06PM +0800, Baolin Wang wrote: > +/* > + * struct sprd_dma_config - DMA configuration structure > + * @config: dma slave channel config > + * @fragment_len: specify one fragment transfer length > + * @block_len: specify one block transfer length > + * @transcation_len

[PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration

2018-04-10 Thread Baolin Wang
There are some Spreadtrum special configuration for DMA controller, thus this patch adds one 'struct sprd_dma_config' structure for users to configure. Moreover this patch did some optimization for sprd_dma_config() and sprd_dma_prep_dma_memcpy() to prepare to configure DMA from users. Signed-off