public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Vinod Koul" <vinod.koul@intel.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	dmaengine@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Hiroyuki Yokoyama" <hiroyuki.yokoyama.vx@renesas.com>
Subject: Re: [PATCH 1/2 v2] dmaengine: rcar-dmac: ensure CHCR DE bit is actually 0 after clear
Date: Tue, 21 Nov 2017 10:16:58 +0200	[thread overview]
Message-ID: <1874044.cuZmJqfgp6@avalon> (raw)
In-Reply-To: <CAMuHMdWAJOOR4Gc-HP8OEr-PZ2DBhOAALHnkAeinGs39OwPP8Q@mail.gmail.com>

On Friday, 17 November 2017 10:41:05 EET Geert Uytterhoeven wrote:
> On Fri, Nov 17, 2017 at 1:10 AM, Kuninori Morimoto wrote:
> >>> +static void rcar_dmac_chcr_de_barrier(struct rcar_dmac_chan *chan)
> >>> +{
> >>> +       u32 chcr;
> >>> +       int i;
> >> 
> >> unsigned int
> >> 
> >>> +
> >>> +       /*
> >>> +        * Ensure that the setting of the DE bit is actually 0 after
> >>> +        * clearing it.
> >>> +        */
> >>> +       for (i = 0; i < 1024; i++) {
> >>> +               chcr = rcar_dmac_chan_read(chan, RCAR_DMACHCR);
> >>> +               if (!(chcr & RCAR_DMACHCR_DE))
> >>> +                       return;
> >>> +               udelay(1);
> >>> +       }
> >> 
> >> What's a typical number of loops needed before DE is really cleared?
> > 
> > It case by case, but I don't want to use while(1) loop
> 
> I understand that, and I agree wholeheartedly with limiting the number
> of cycles.

So do I, but I'd still like to know what the typical values are :-)

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2017-11-21  8:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16  4:31 [PATCH 0/2 v2] dmaengine: rcar-dmac: use TCRB instead of TCR Kuninori Morimoto
2017-11-16  4:33 ` [PATCH 1/2 v2] dmaengine: rcar-dmac: ensure CHCR DE bit is actually 0 after clear Kuninori Morimoto
2017-11-16  9:46   ` Geert Uytterhoeven
2017-11-17  0:10     ` Kuninori Morimoto
2017-11-17  8:41       ` Geert Uytterhoeven
2017-11-21  8:16         ` Laurent Pinchart [this message]
2017-11-22  1:44           ` Kuninori Morimoto
2017-11-16  4:34 ` [PATCH 2/2 v2] dmaengine: rcar-dmac: use TCRB instead of TCR for residue Kuninori Morimoto
2017-11-16 12:54   ` Geert Uytterhoeven
2017-11-17  0:13     ` Kuninori Morimoto

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=1874044.cuZmJqfgp6@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=hiroyuki.yokoyama.vx@renesas.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --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