Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968004AbdIZIXt (ORCPT ); Tue, 26 Sep 2017 04:23:49 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:45646 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966216AbdIZIXr (ORCPT ); Tue, 26 Sep 2017 04:23:47 -0400 Date: Tue, 26 Sep 2017 10:23:44 +0200 From: Boris Brezillon To: Masahiro Yamada Cc: Richard Weinberger , Linux Kernel Mailing List , Marek Vasut , linux-mtd@lists.infradead.org, Cyrille Pitchen , Brian Norris , David Woodhouse Subject: Re: [PATCH] mtd: nand: wait for tWHR after NAND_CMD_STATUS / NAND_CMD_READID Message-ID: <20170926102344.6953d072@bbrezillon> In-Reply-To: References: <1506397164-3648-1-git-send-email-yamada.masahiro@socionext.com> <20170926084356.553867a1@bbrezillon> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1307 Lines: 45 On Tue, 26 Sep 2017 17:17:49 +0900 Masahiro Yamada wrote: > 2017-09-26 15:43 GMT+09:00 Boris Brezillon : > > On Tue, 26 Sep 2017 12:39:24 +0900 > > Masahiro Yamada 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 > >> --- > > > > > 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); > > > >