All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Richard Weinberger <richard@nod.at>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Marek Vasut <marek.vasut@gmail.com>,
	linux-mtd@lists.infradead.org,
	Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] mtd: nand: wait for tWHR after NAND_CMD_STATUS / NAND_CMD_READID
Date: Tue, 26 Sep 2017 10:23:44 +0200	[thread overview]
Message-ID: <20170926102344.6953d072@bbrezillon> (raw)
In-Reply-To: <CAK7LNASpP9qQABLqXPqz8bQNsMjuxb8GKHU4Xxy_dAhgzT2O2A@mail.gmail.com>

On Tue, 26 Sep 2017 17:17:49 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> 2017-09-26 15:43 GMT+09:00 Boris Brezillon <boris.brezillon@free-electrons.com>:
> > On Tue, 26 Sep 2017 12:39:24 +0900
> > Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> >  
> >> Read Status and Read ID require tWHR before reading the first data.
> >> Insert a very short wait to make sure to meet the spec.
> >>
> >> I have not seen any problem report for now, but nand_command() and
> >> nand_command_lP() are generic hooks, so it makes sense to implement
> >> fail-safe code here.
> >>
> >> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >> ---  
> >  
> 
> 
> OK, will do.
> 
> 
> 
> BTW, I see unconditional wait for tWB a few lines below,
> but it gives no performance regression because we will wait
> much longer in nand_wait_ready().

Yep, but this one is here for quite some time. Normally there should be
no problem with your ndelay(200), but I don't want to take the risk
and have someone complain that his NAND controller driver is broken
because of this extra delay ;-).

> 
> 
>      /*
>       * Apply this short delay always to ensure that we do wait tWB in
>       * any case on any machine.
>       */
>      ndelay(100);
> 
>      nand_wait_ready(mtd);
> 
> 
> 
> 

      reply	other threads:[~2017-09-26  8:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26  3:39 [PATCH] mtd: nand: wait for tWHR after NAND_CMD_STATUS / NAND_CMD_READID Masahiro Yamada
2017-09-26  6:43 ` Boris Brezillon
2017-09-26  8:17   ` Masahiro Yamada
2017-09-26  8:23     ` Boris Brezillon [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=20170926102344.6953d072@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@wedev4u.fr \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    --cc=yamada.masahiro@socionext.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.