Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1579584

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

From Vinod Koul <vinod.koul@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] dma: imx-sdma: add 1ms delay to ensure SDMA channel is stopped
Date 2017-02-13 11:30 +0100
Message-ID <tam3p-2qv-33@gated-at.bofh.it> (permalink)
References <t9kGl-4F0-1@gated-at.bofh.it> <taefw-5FQ-7@gated-at.bofh.it> <taisN-8sW-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 properly..
> >
> I got the information from NXP (freescale) R&D team,
> according to them, by write '1' to SDMA_H_STATSTOP, only disables
> the related sdma channel (so poll HE bit will indicates the channel
> has been disabled),
> but it cannot ensure SDMA core stop to access modules' FIFO,
> SDMA core may still is running, this is a bug in HW.

Okay b ut you are not doing the HE bit here..??
> 
> regarding if the '1ms' is enough to ensure SDMA core has stopped,
> NXP R&D team mentioned:
> "we should add some delay of one BD SDMA cost time after disable the
> channel bit, the maximum is 1ms"
> so I assume 1ms should work for all cases

At least please document this in changelog and comments in code.

-- 
~Vinod

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] dma: imx-sdma: add 1ms delay to ensure SDMA channel is stopped <jiada_wang@mentor.com> - 2017-02-10 15:50 +0100
  Re: [PATCH 1/1] dma: imx-sdma: add 1ms delay to ensure SDMA channel  is stopped Vinod Koul <vinod.koul@intel.com> - 2017-02-13 03:10 +0100
    Re: [PATCH 1/1] dma: imx-sdma: add 1ms delay to ensure SDMA channel  is stopped Jiada Wang <jiada_wang@mentor.com> - 2017-02-13 07:40 +0100
      Re: [PATCH 1/1] dma: imx-sdma: add 1ms delay to ensure SDMA channel  is stopped Vinod Koul <vinod.koul@intel.com> - 2017-02-13 11:30 +0100

csiph-web