Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-15 Thread Geert Uytterhoeven
Hi Vinod, On Mon, Dec 15, 2014 at 7:43 AM, Vinod Koul vinod.k...@intel.com wrote: On Thu, Dec 11, 2014 at 11:52:10PM +0200, Laurent Pinchart wrote: On Thursday 11 December 2014 22:47:32 Wolfram Sang wrote: Note that the I2C drives uses subsys_initcall() for historic reasons, while the

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-15 Thread Wolfram Sang
Please let me summarize... Thanks for the summary, Geert! Solutions under consideration: 1. Wolfram posted a patch to make i2c-sh_mobile fall back to PIO, and retry DMA initialization in every request, so it will switch to DMA when it becomes available. But this is suboptimal, as it

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-15 Thread Vinod Koul
On Mon, Dec 15, 2014 at 09:31:01AM +0100, Geert Uytterhoeven wrote: Please let me summarize... Thanks :) During probe of a DMA client driver, the DMA engine driver may not be available, causing dma_request_slave_channel*() to return -EPROBE-DEFER. There are actually two different reasons

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-15 Thread Geert Uytterhoeven
Hi Wolfram, On Mon, Dec 15, 2014 at 10:06 AM, Wolfram Sang w...@the-dreams.de wrote: Solutions under consideration: 1. Wolfram posted a patch to make i2c-sh_mobile fall back to PIO, and retry DMA initialization in every request, so it will switch to DMA when it becomes available. But

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-15 Thread Laurent Pinchart
Hi Vinod, On Monday 15 December 2014 14:43:14 Vinod Koul wrote: On Mon, Dec 15, 2014 at 09:31:01AM +0100, Geert Uytterhoeven wrote: Please let me summarize... Thanks :) During probe of a DMA client driver, the DMA engine driver may not be available, causing

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-15 Thread Wolfram Sang
Quite right, this is a good question. Today we cannot distinguish between the two. Should we improve the deferred probe to tell us when the init is complete and all the modules have been initialized? If we ever have such a mechanism to check then we know no modules are to be inserted then we

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-15 Thread Vinod Koul
On Mon, Dec 15, 2014 at 11:42:46AM +0200, Laurent Pinchart wrote: Hi Vinod, On Monday 15 December 2014 14:43:14 Vinod Koul wrote: On Mon, Dec 15, 2014 at 09:31:01AM +0100, Geert Uytterhoeven wrote: Please let me summarize... Thanks :) During probe of a DMA client driver, the

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-15 Thread Vinod Koul
On Mon, Dec 15, 2014 at 10:45:33AM +0100, Wolfram Sang wrote: Quite right, this is a good question. Today we cannot distinguish between the two. Should we improve the deferred probe to tell us when the init is complete and all the modules have been initialized? If we ever have such a

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-14 Thread Vinod Koul
On Thu, Dec 11, 2014 at 11:52:10PM +0200, Laurent Pinchart wrote: On Thursday 11 December 2014 22:47:32 Wolfram Sang wrote: Note that the I2C drives uses subsys_initcall() for historic reasons, while the DMA driver uses module_init(). This is hard to revert without introducing

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-12 Thread Wolfram Sang
Other than that, even if we move to module_init, we reduce the chance of getting a deferred probe, but we do not eliminate it... Sure, but reducing the chance of deferred probe is a good idea in my opinion :-) Yes, that's a thing nice to have. It is just, I ought to work on must have

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-11 Thread Wolfram Sang
On Thu, Dec 11, 2014 at 09:47:29AM +0200, Laurent Pinchart wrote: On Thursday 11 December 2014 08:37:27 Wolfram Sang wrote: I think this is a limitation of driver may not be for HW. The right model for dma_chan is to be viewed as SW channels and not the ones of HW (yes that is how most

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-11 Thread Laurent Pinchart
Hi Wolfram, On Wednesday 10 December 2014 15:23:15 Wolfram Sang wrote: On Wed, Dec 10, 2014 at 04:19:36PM +0200, Laurent Pinchart wrote: (CC'ing the dmaengine mailing list) Thanks! On Wednesday 10 December 2014 09:01:55 Wolfram Sang wrote: On Wed, Dec 10, 2014 at 02:44:01PM +0900,

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-11 Thread Laurent Pinchart
On Thursday 11 December 2014 22:47:32 Wolfram Sang wrote: Note that the I2C drives uses subsys_initcall() for historic reasons, while the DMA driver uses module_init(). This is hard to revert without introducing potential regressions on older boards. So, the I2C DMA support needs to

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-10 Thread Wolfram Sang
On Wed, Dec 10, 2014 at 02:44:01PM +0900, Magnus Damm wrote: Hi Wolfram, Geert, On Tue, Dec 9, 2014 at 11:09 PM, Wolfram Sang w...@the-dreams.de wrote: On Tue, Dec 09, 2014 at 11:53:45AM +0100, Geert Uytterhoeven wrote: Hi Wolfram, On Fri, Nov 7, 2014 at 11:11 AM, Wolfram Sang

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-10 Thread Laurent Pinchart
(CC'ing the dmaengine mailing list) On Wednesday 10 December 2014 09:01:55 Wolfram Sang wrote: On Wed, Dec 10, 2014 at 02:44:01PM +0900, Magnus Damm wrote: On Tue, Dec 9, 2014 at 11:09 PM, Wolfram Sang w...@the-dreams.de wrote: On Tue, Dec 09, 2014 at 11:53:45AM +0100, Geert Uytterhoeven

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-10 Thread Wolfram Sang
On Wed, Dec 10, 2014 at 04:19:36PM +0200, Laurent Pinchart wrote: (CC'ing the dmaengine mailing list) Thanks! On Wednesday 10 December 2014 09:01:55 Wolfram Sang wrote: On Wed, Dec 10, 2014 at 02:44:01PM +0900, Magnus Damm wrote: On Tue, Dec 9, 2014 at 11:09 PM, Wolfram Sang

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-09 Thread Wolfram Sang
On Tue, Dec 09, 2014 at 11:53:45AM +0100, Geert Uytterhoeven wrote: Hi Wolfram, On Fri, Nov 7, 2014 at 11:11 AM, Wolfram Sang w...@the-dreams.de wrote: --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c @@ -727,6 +886,21 @@ static int

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-12-09 Thread Magnus Damm
Hi Wolfram, Geert, On Tue, Dec 9, 2014 at 11:09 PM, Wolfram Sang w...@the-dreams.de wrote: On Tue, Dec 09, 2014 at 11:53:45AM +0100, Geert Uytterhoeven wrote: Hi Wolfram, On Fri, Nov 7, 2014 at 11:11 AM, Wolfram Sang w...@the-dreams.de wrote: --- a/drivers/i2c/busses/i2c-sh_mobile.c +++

Re: [PATCH 2/5] i2c: sh_mobile: add DMA support

2014-11-12 Thread Wolfram Sang
On Fri, Nov 07, 2014 at 11:11:41AM +0100, Wolfram Sang wrote: From: Wolfram Sang wsa+rene...@sang-engineering.com Make it possible to transfer i2c message buffers via DMA. Start/Stop/Sending_Slave_Adress is still handled using the old state machine, it is sending the actual data that is done