Re: [RFC v02 03/15] dmaengine: core: Introduce new, universal API to request a channel

2015-11-30 Thread Andy Shevchenko
On Mon, Nov 30, 2015 at 3:45 PM, Peter Ujfalusi wrote: > The two API function can cover most, if not all current APIs used to > request a channel. With minimal effort dmaengine drivers, platforms and > dmaengine user drivers can be converted to use the two function. > >

Re: [RFC v02 02/15] dmaengine: core: Move and merge the code paths using private_candidate

2015-11-30 Thread Andy Shevchenko
On Mon, Nov 30, 2015 at 3:45 PM, Peter Ujfalusi wrote: > Channel matching with private_candidate() is used in two paths, the error > checking is slightly different in them and they are duplicating code also. > Move the code under dma_get_channel() to provide consistent

Re: [RFC v02 03/15] dmaengine: core: Introduce new, universal API to request a channel

2015-11-30 Thread Tony Lindgren
Hi, * Peter Ujfalusi [151130 05:49]: > > For each dmaengine driver an array of DMA device, slave and the parameter > for the filter function needs to be added: > > static struct dma_filter_map da830_edma_map[] = { > DMA_FILTER_ENTRY("davinci-mcasp.0", "rx",

[RFC v02 12/15] ARM: davinci: devices-da8xx: Remove DMA resources for MMC and SPI

2015-11-30 Thread Peter Ujfalusi
The drivers are now converted to not use the DMA resource. Signed-off-by: Peter Ujfalusi --- arch/arm/mach-davinci/devices-da8xx.c | 49 --- 1 file changed, 49 deletions(-) diff --git a/arch/arm/mach-davinci/devices-da8xx.c

[RFC v02 13/15] ARM: davinci: devices: Remove DMA resources for MMC

2015-11-30 Thread Peter Ujfalusi
The driver is converted to not use the DMA resource. Signed-off-by: Peter Ujfalusi --- arch/arm/mach-davinci/devices.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c index

[RFC v02 14/15] ARM: davinci: dm355: Remove DMA resources for SPI

2015-11-30 Thread Peter Ujfalusi
The driver is converted to not use the DMA resource. Signed-off-by: Peter Ujfalusi --- arch/arm/mach-davinci/dm355.c | 8 1 file changed, 8 deletions(-) diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index dc8d7ccf69f4..7c6ab2d16e3e

[RFC v02 08/15] ARM: davinci: dm644x: Add dma_filter_map to edma

2015-11-30 Thread Peter Ujfalusi
Provide the dma_filter_map to edma which will allow us to move the drivers to the new, simpler dmaengine API and we can remove the DMA resources also for the devices. Signed-off-by: Peter Ujfalusi --- arch/arm/mach-davinci/dm644x.c | 12 1 file changed, 12

[RFC v02 07/15] ARM: davinci: dm365: Add dma_filter_map to edma

2015-11-30 Thread Peter Ujfalusi
Provide the dma_filter_map to edma which will allow us to move the drivers to the new, simpler dmaengine API and we can remove the DMA resources also for the devices. Signed-off-by: Peter Ujfalusi --- arch/arm/mach-davinci/dm365.c | 22 ++ 1 file

[RFC v02 10/15] mmc: davinci_mmc: Use dma_request_chan() to requesting DMA channel

2015-11-30 Thread Peter Ujfalusi
With the new dma_request_chan() the clinet driver does not need to look for the DMA resource and it does not need to pass filter_fn anymore. By switching to the new API the davinci_mmc driver can now support deferred probing against DMA. Signed-off-by: Peter Ujfalusi ---

[RFC v02 09/15] ARM: davinci: dm646x: Add dma_filter_map to edma

2015-11-30 Thread Peter Ujfalusi
Provide the dma_filter_map to edma which will allow us to move the drivers to the new, simpler dmaengine API and we can remove the DMA resources also for the devices. Signed-off-by: Peter Ujfalusi --- arch/arm/mach-davinci/dm646x.c | 11 +++ 1 file changed, 11

[RFC v02 11/15] spi: davinci: Use dma_request_chan() to requesting DMA channel

2015-11-30 Thread Peter Ujfalusi
With the new dma_request_chan() the clinet driver does not need to look for the DMA resource and it does not need to pass filter_fn anymore. By switching to the new API the davinci_mmc driver can now support deferred probing against DMA. Signed-off-by: Peter Ujfalusi ---

[RFC v02 06/15] ARM: davinci: dm355: Add dma_filter_map to edma

2015-11-30 Thread Peter Ujfalusi
Provide the dma_filter_map to edma which will allow us to move the drivers to the new, simpler dmaengine API and we can remove the DMA resources also for the devices. Signed-off-by: Peter Ujfalusi --- arch/arm/mach-davinci/dm355.c | 20 1 file

[RFC v02 02/15] dmaengine: core: Move and merge the code paths using private_candidate

2015-11-30 Thread Peter Ujfalusi
Channel matching with private_candidate() is used in two paths, the error checking is slightly different in them and they are duplicating code also. Move the code under dma_get_channel() to provide consistent execution and going to allow us to reuse this mode of channel lookup later.

[RFC v02 05/15] ARM: davinci: devices-da8xx: Add dma_filter_map to edma

2015-11-30 Thread Peter Ujfalusi
Provide the dma_filter_map to edma which will allow us to move the drivers to the new, simpler dmaengine API and we can remove the DMA resources also for the devices. Signed-off-by: Peter Ujfalusi --- arch/arm/mach-davinci/devices-da8xx.c | 46

[RFC v02 04/15] dmaengine: edma: Add support for DMA filter mapping to slave devices

2015-11-30 Thread Peter Ujfalusi
Add support for providing device to filter_fn mapping so client drivers can switch to use the dma_request_chan() API. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 24 include/linux/platform_data/edma.h | 5 + 2 files

[RFC v02 00/15] dmaengine: New 'universal' API for requesting channel

2015-11-30 Thread Peter Ujfalusi
Hi, Changes since RFC v01: - dma_request_chan(); lost the mask parameter - The new API does not rely on RESOURCE_DMA, instead the dma_filter_map table will be used to provide the needed information to the filter function in legacy mode - Extended the example patches to convert most of daVinci

[RFC v02 01/15] dmaengine: core: Allow NULL mask pointer in __dma_device_satisfies_mask()

2015-11-30 Thread Peter Ujfalusi
Treat as true condition the case when the mask is NULL. Signed-off-by: Peter Ujfalusi --- drivers/dma/dmaengine.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index daf54a39bcc7..52c3eee48e2e 100644 ---

Re: [RFC v02 03/15] dmaengine: core: Introduce new, universal API to request a channel

2015-11-30 Thread Arnd Bergmann
On Monday 30 November 2015 15:45:33 Peter Ujfalusi wrote: > const char *name); > struct dma_chan *dma_request_slave_channel(struct device *dev, const char > *name); > + > +struct dma_chan *dma_request_chan(struct device *dev, const char *name); >

Re: [RFC v02 04/15] dmaengine: edma: Add support for DMA filter mapping to slave devices

2015-11-30 Thread Arnd Bergmann
On Monday 30 November 2015 15:45:34 Peter Ujfalusi wrote: > @@ -2428,6 +2436,22 @@ bool edma_filter_fn(struct dma_chan *chan, void *param) > } > EXPORT_SYMBOL(edma_filter_fn); > > +static bool edma_filter_for_map(struct dma_chan *chan, void *param) > +{ > + bool match = false; > + > +

Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel

2015-11-30 Thread Arnd Bergmann
On Monday 30 November 2015 15:45:30 Peter Ujfalusi wrote: > Changes since RFC v01: >- dma_request_chan(); lost the mask parameter >- The new API does not rely on RESOURCE_DMA, instead the dma_filter_map table > will be used to provide the needed information to the filter function in > legacy

Re: [RFC v02 00/15] dmaengine: New 'universal' API for requesting channel

2015-11-30 Thread Andy Shevchenko
On Mon, Nov 30, 2015 at 3:45 PM, Peter Ujfalusi wrote: > Hi, > > Changes since RFC v01: > - dma_request_chan(); lost the mask parameter > - The new API does not rely on RESOURCE_DMA, instead the dma_filter_map table > will be used to provide the needed information to the

Re: [RFC v02 01/15] dmaengine: core: Allow NULL mask pointer in __dma_device_satisfies_mask()

2015-11-30 Thread Andy Shevchenko
On Mon, Nov 30, 2015 at 3:45 PM, Peter Ujfalusi wrote: > Treat as true condition the case when the mask is NULL. What do you think about setting some default (all "on") mask when mask is not supplied? I don't know for sure but there might be cases when you don't want