Re: [PATCH 1/1] dma: imx-sdma: add 1ms delay to ensure SDMA channel is stopped

2017-03-01 Thread Jiada Wang
Hello Vinod On 02/13/2017 07:22 PM, Vinod Koul wrote: On Mon, Feb 13, 2017 at 03:30:19PM +0900, Jiada Wang wrote: +static int sdma_disable_channel_with_delay(struct dma_chan *chan) +{ + sdma_disable_channel(chan); + mdelay(1); what is the gaurantee that 1ms is fine? Shouldn't you

Re: [PATCH 1/1] dma: imx-sdma: add 1ms delay to ensure SDMA channel is stopped

2017-02-13 Thread Vinod Koul
On Mon, Feb 13, 2017 at 03:30:19PM +0900, Jiada Wang wrote: > >>+static int sdma_disable_channel_with_delay(struct dma_chan *chan) > >>+{ > >>+ sdma_disable_channel(chan); > >>+ mdelay(1); > > > >what is the gaurantee that 1ms is fine? Shouldn't you poll the bit to see > >channel is disabled pr

Re: [PATCH 1/1] dma: imx-sdma: add 1ms delay to ensure SDMA channel is stopped

2017-02-12 Thread Jiada Wang
Hello Vinod On 02/13/2017 11:05 AM, Vinod Koul wrote: On Fri, Feb 10, 2017 at 06:46:45AM -0800, jiada_w...@mentor.com wrote: From: Jiada Wang sdma_disable_channel() cannot ensure dma is stopped to access module's FIFOs. Maybe SDMA core is running and accessing BD when disable of corresponding

Re: [PATCH 1/1] dma: imx-sdma: add 1ms delay to ensure SDMA channel is stopped

2017-02-12 Thread Vinod Koul
On Fri, Feb 10, 2017 at 06:46:45AM -0800, jiada_w...@mentor.com wrote: > From: Jiada Wang > > sdma_disable_channel() cannot ensure dma is stopped to access > module's FIFOs. Maybe SDMA core is running and accessing BD when > disable of corresponding channel, this may cause sometimes even > after

[PATCH 1/1] dma: imx-sdma: add 1ms delay to ensure SDMA channel is stopped

2017-02-10 Thread jiada_wang
From: Jiada Wang sdma_disable_channel() cannot ensure dma is stopped to access module's FIFOs. Maybe SDMA core is running and accessing BD when disable of corresponding channel, this may cause sometimes even after call of .sdma_disable_channel(), SDMA core still be running and accessing module's