[PATCH] i2c-davinci: Handle signals gracefully

2014-03-13 Thread Mike Looijmans
When a signal is caught while the i2c-davinci bus driver is transferring, the drive just "abandons" the transfer and leaves the controller to fend for itself. The next I2C transaction will find the controller in an undefined state and often results in a stream of "initiating i2c bus recovery" messa

Re: [PATCH] i2c-davinci: Handle signals gracefully

2014-03-13 Thread Mike Looijmans
On 03/10/2014 04:24 PM, Wolfram Sang wrote: Even more, you should complete the whole transfer. There are devices where things can really go wrong if you send a half-complete command and then start with the next one. So, not checking signals at all is the way to go for I2C drivers. There is som

[PATCH] media: davinci: vpbe: fix build warning

2014-03-13 Thread Lad, Prabhakar
From: "Lad, Prabhakar" this patch fixes following build warning drivers/media/platform/davinci/vpbe_display.c: In function 'vpbe_start_streaming': drivers/media/platform/davinci/vpbe_display.c:344: warning: unused variable 'vpbe_dev' Signed-off-by: Lad, Prabhakar --- drivers/media/platform/d

Re: [PATCH RFC] net: davinci_emac: Fix rollback of emac_dev_open()

2014-03-13 Thread Prabhakar Lad
Hi Mugunthan, On Mon, Mar 10, 2014 at 12:46 PM, Christian Riesch wrote: > > > --On March 07, 2014 20:15 +0530 Mugunthan V N wrote: > >> On Friday 07 March 2014 07:37 PM, Christian Riesch wrote: >>> >>> Signed-off-by: Christian Riesch >>> Cc: Prabhakar Lad >>> Cc: Mugunthan V N >>> Cc: Florian

Re: [PATCH 00/18] edma/ASoC: dmaengine PCM for AM335x and AM447x

2014-03-13 Thread Mark Brown
On Thu, Mar 13, 2014 at 11:18:22AM +0200, Peter Ujfalusi wrote: > With this series AM335x and AM447x will use the dmaengine PCM for audio. The > daVinci devices will keep using the davinci-pcm for now since I do not have > means to test them but the code is written in a way that they can be switch

Re: [alsa-devel] [PATCH 13/18] dma: edma: Print the direction value as well when it is not supported

2014-03-13 Thread Peter Ujfalusi
On 03/13/2014 03:03 PM, Shevchenko, Andriy wrote: > On Thu, 2014-03-13 at 11:18 +0200, Peter Ujfalusi wrote: >> In case of not supported direction it is better to print the direction also. >> It is unlikely, but in such an event it helps with the debugging. >> >> Signed-off-by: Peter Ujfalusi >> -

Re: [alsa-devel] [PATCH 14/18] ASoC: davinci: Add edma dmaengine platform driver

2014-03-13 Thread Lars-Peter Clausen
On 03/13/2014 02:03 PM, Peter Ujfalusi wrote: On 03/13/2014 12:28 PM, Lars-Peter Clausen wrote: +int edma_pcm_platform_register(struct device *dev) +{ +if (dev->of_node) +return snd_dmaengine_pcm_register(dev, +&edma_dmaengine_pcm_config, +SND_

Re: [PATCH 10/18] dma: edma: Reduce debug print verbosity for non verbose debugging

2014-03-13 Thread Peter Ujfalusi
On 03/13/2014 02:53 PM, Shevchenko, Andriy wrote: > On Thu, 2014-03-13 at 11:18 +0200, Peter Ujfalusi wrote: >> Do not print the paRAM information when verbose debugging is not asked and >> also reduce the number of lines printed in edma_prep_dma_cyclic() >> >> Signed-off-by: Peter Ujfalusi >> ---

Re: [alsa-devel] [PATCH 14/18] ASoC: davinci: Add edma dmaengine platform driver

2014-03-13 Thread Peter Ujfalusi
On 03/13/2014 12:28 PM, Lars-Peter Clausen wrote: >> +int edma_pcm_platform_register(struct device *dev) >> +{ >> +if (dev->of_node) >> +return snd_dmaengine_pcm_register(dev, >> +&edma_dmaengine_pcm_config, >> +SND_DMAENGINE_PCM_FLAG_NO_RESIDUE);

Re: [alsa-devel] [PATCH 14/18] ASoC: davinci: Add edma dmaengine platform driver

2014-03-13 Thread Lars-Peter Clausen
On 03/13/2014 12:56 PM, Peter Ujfalusi wrote: On 03/13/2014 12:28 PM, Lars-Peter Clausen wrote: On 03/13/2014 10:18 AM, Peter Ujfalusi wrote: [...] +static const struct snd_pcm_hardware edma_pcm_hardware = { +.info = SNDRV_PCM_INFO_MMAP | + SNDRV_PCM_INFO_MMAP_VALID | + SND

Re: [alsa-devel] [PATCH 14/18] ASoC: davinci: Add edma dmaengine platform driver

2014-03-13 Thread Peter Ujfalusi
On 03/13/2014 12:28 PM, Lars-Peter Clausen wrote: > On 03/13/2014 10:18 AM, Peter Ujfalusi wrote: [...] >> +static const struct snd_pcm_hardware edma_pcm_hardware = { +.info >> = SNDRV_PCM_INFO_MMAP | + SNDRV_PCM_INFO_MMAP_VALID | + >> SNDRV_PCM_INFO_BATCH | +

Re: [alsa-devel] [PATCH 14/18] ASoC: davinci: Add edma dmaengine platform driver

2014-03-13 Thread Lars-Peter Clausen
On 03/13/2014 10:18 AM, Peter Ujfalusi wrote: [...] +static const struct snd_pcm_hardware edma_pcm_hardware = { + .info = SNDRV_PCM_INFO_MMAP | + SNDRV_PCM_INFO_MMAP_VALID | + SNDRV_PCM_INFO_BATCH | +

[PATCH 18/18] ASoC: davinci-mcasp: Place constraint on the period size based on FIFO config

2014-03-13 Thread Peter Ujfalusi
We need to place constraint on the period size (and indirectly to buffer size) if the read or write AFIFO is enabled and it is configured for more than one word otherwise the DMA will fail in buffer configuration where the sizes are not aligned with the requested FIFO configuration. Signed-off-by:

[PATCH 14/18] ASoC: davinci: Add edma dmaengine platform driver

2014-03-13 Thread Peter Ujfalusi
Platform driver glue for SoC using eDMA3 to use dmaengine PCM. The maximum number of periods need to be limited to 19 since the edma dmaengine driver limits the paRAM slot use for audio at in cyclic mode. Signed-off-by: Peter Ujfalusi --- sound/soc/davinci/Kconfig| 1 + sound/soc/davinci/Ma

[PATCH 13/18] dma: edma: Print the direction value as well when it is not supported

2014-03-13 Thread Peter Ujfalusi
In case of not supported direction it is better to print the direction also. It is unlikely, but in such an event it helps with the debugging. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/edma.c b/drivers

[PATCH 16/18] ASoC: davinci-mcasp: Provide correct filter_data for dmaengine for non-DT boot

2014-03-13 Thread Peter Ujfalusi
When we boot with non-DT mode the damengine will need the channel number and a filter function in order to get the channel. The filter_data is filled in the DAI driver while the filter_function will be provided by the edma-pcm driver. Signed-off-by: Peter Ujfalusi --- sound/soc/davinci/davinci-m

[PATCH 15/18] ASoC: davinci-mcasp: Use dmaengine based platform driver for AM335x/447x

2014-03-13 Thread Peter Ujfalusi
Use the edma-pcm with AM335x and AM447x SoCs. Keep using the davinci-pcm for DaVinci devices, they can be switched to use the dmaengine based driver later when they are verified to work correctly. Signed-off-by: Peter Ujfalusi --- sound/soc/davinci/davinci-mcasp.c | 46 ++

[PATCH 17/18] ASoC: davinci-mcasp: Assign the dma_data earlier in dai_probe callback

2014-03-13 Thread Peter Ujfalusi
Remove the dai startup callback and do the dma_data setup for dmaengine in the dai_probe function. Signed-off-by: Peter Ujfalusi --- sound/soc/davinci/davinci-mcasp.c | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/sound/soc/davinci/davin

[PATCH 10/18] dma: edma: Reduce debug print verbosity for non verbose debugging

2014-03-13 Thread Peter Ujfalusi
Do not print the paRAM information when verbose debugging is not asked and also reduce the number of lines printed in edma_prep_dma_cyclic() Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/dma/edma.c b/d

[PATCH 12/18] dma: edma: Add channel number to debug prints

2014-03-13 Thread Peter Ujfalusi
It helps to identify issues if we have some information regarding to the channel which the event is associated. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 07ac5f4eeb

[PATCH 11/18] dma: edma: Prefix debug prints where the text were identical in prep callbacks

2014-03-13 Thread Peter Ujfalusi
prep_slave_sg and prep_dma_cyclic callbacks have mostly same failure cases with the same texts printed in case we hit them. It helps when debugging if we know exactly which callback generated the errors. At the same time change the debug level for descriptor allocation failure from dbg to err since

[PATCH 08/18] dma: edma: Implement device_slave_caps callback

2014-03-13 Thread Peter Ujfalusi
With the callback implemented omap-dma can provide information to client drivers regarding to supported address widths, directions, residue granularity, etc. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/dma/e

[PATCH 09/18] dma: edma: Simplify direction configuration in edma_config_pset()

2014-03-13 Thread Peter Ujfalusi
We only support DEV_TO_MEM or MEM_TO_DEV directions with edma driver and the check for the direction has been already done in the function calling edma_config_pset(). The error reporting is redundant and also the "else if ()" can be removed. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c |

[PATCH 06/18] arm: common: edma: API to request non default queue for a channel

2014-03-13 Thread Peter Ujfalusi
When using eDMA3 via dmaengine all dma channels will use the default queue. Since during request time we do not have means to change this it need to be done later, before the DMA has been started. With the added function it is possible to move the channel to a non default queue if it is possible, o

[PATCH 04/18] arm: common: edma: Select event queue 1 as default when booted with DT

2014-03-13 Thread Peter Ujfalusi
Use the EVENTQ_1 for default and leave the EVENTQ_0 to be used by high priority channels, like audio. Signed-off-by: Peter Ujfalusi --- arch/arm/common/edma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index 86a8b263278f.

[PATCH 05/18] arm: common: edma: Save the number of event queues/TCs

2014-03-13 Thread Peter Ujfalusi
For later use save the number of queues available for the CC. Signed-off-by: Peter Ujfalusi --- arch/arm/common/edma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index 19520e2519d9..be267b2080be 100644 --- a/arch/arm/common/edma.c +++ b

[PATCH 03/18] dma: edma: Set DMA_CYCLIC capability flag

2014-03-13 Thread Peter Ujfalusi
Indicate that the edma dmaengine driver has support for cyclic mode. Signed-off-by: Peter Ujfalusi --- arch/arm/common/edma.c | 1 + drivers/dma/edma.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index 41bca32409fc..86a8b263278f 10064

[PATCH 07/18] DMA: edma: Use different eventq for cyclic channels

2014-03-13 Thread Peter Ujfalusi
To improve latency with cyclic DMA operation it is preferred to use different eventq/tc than the default which is used by all other drivers (mmc, spi, i2c, etc). When preparing the cyclic dma ask for non default queue for the channel which is going to be used with cyclic mode. Signed-off-by: Peter

[PATCH 01/18] platform_data: edma: Be precise with the paRAM struct

2014-03-13 Thread Peter Ujfalusi
The edmacc_param struct should follow the layout of the paRAM area in the HW. Be explicit on the size of the fields (u32) and also mark the struct as packed to avoid any padding on non 32bit architectures. Signed-off-by: Peter Ujfalusi --- include/linux/platform_data/edma.h | 18 +---

[PATCH 00/18] edma/ASoC: dmaengine PCM for AM335x and AM447x

2014-03-13 Thread Peter Ujfalusi
Hi, With this series AM335x and AM447x will use the dmaengine PCM for audio. The daVinci devices will keep using the davinci-pcm for now since I do not have means to test them but the code is written in a way that they can be switched to use the edma-pcm easily (DA850/OMAP-L138 has been tested and

[PATCH 02/18] dma: edma: Add support for DMA_PAUSE/RESUME operation

2014-03-13 Thread Peter Ujfalusi
Pause/Resume can be used by the audio stack when the stream is paused/resumed The edma platform code has support for this and the legacy audio stack used this. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 28 1 file changed, 28 insertions(+) diff --git a/d