From: Jiada Wang <jiada_wang@mentor.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: <dan.j.williams@intel.com>, <dmaengine@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] dma: imx-sdma: add 1ms delay to ensure SDMA channel is stopped
Date: Wed, 1 Mar 2017 17:14:47 +0900 [thread overview]
Message-ID: <06384fdf-64b6-c796-a4ef-676c7d14f0e7@mentor.com> (raw)
In-Reply-To: <20170213102254.GK2843@localhost>
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 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..??
by calling sdma_disable_channel(chan) here, sdma driver clears
corresponding HE bit, thus disables the channel. But it can't ensure
SDMA core is stopped by this operation.
>>
>> 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.
>
I will update my patch to add comments once all concerns are addressed.
Thanks,
Jiada
prev parent reply other threads:[~2017-03-01 8:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 14:46 jiada_wang
2017-02-13 2:05 ` Vinod Koul
2017-02-13 6:30 ` Jiada Wang
2017-02-13 10:22 ` Vinod Koul
2017-03-01 8:14 ` Jiada Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06384fdf-64b6-c796-a4ef-676c7d14f0e7@mentor.com \
--to=jiada_wang@mentor.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®