From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751710AbdJDLFT convert rfc822-to-8bit (ORCPT ); Wed, 4 Oct 2017 07:05:19 -0400 Received: from us-smtp-delivery-107.mimecast.com ([216.205.24.107]:20224 "EHLO us-smtp-delivery-107.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbdJDLFR (ORCPT ); Wed, 4 Oct 2017 07:05:17 -0400 Subject: Re: [PATCH v2 0/2] mtd: nand: wait for tWHR, and fix the setup_data_interface of Denali To: Masahiro Yamada , Boris Brezillon CC: linux-mtd , Cyrille Pitchen , LKML , Marek Vasut , Brian Norris , Richard Weinberger , David Woodhouse , Mason References: <1506681520-13897-1-git-send-email-yamada.masahiro@socionext.com> <20170929142635.07d55f77@bbrezillon> From: Marc Gonzalez Message-ID: Date: Wed, 4 Oct 2017 13:05:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.1 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [172.27.0.114] X-MC-Unique: 6K1BWekgN4C5zyRzz-ooyw-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/09/2017 16:33, Masahiro Yamada wrote: > (+CC Marc Gonzalez) > > 2017-09-29 21:26 GMT+09:00 Boris Brezillon : >> On Fri, 29 Sep 2017 19:38:38 +0900 >> Masahiro Yamada wrote: >> >>> 1/2 : add NAND_WAIT_TWHR and nand_whr_delay(). >>> You can set this new flag if you want nand_command(_lp) >>> to insert tWHR delay where needed. >>> >>> 2/2 : Fix Denali setup_data_interface. >>> Boris' suggestion in v1 was a good reminder that >>> made me realize tCCS was missing in the driver. Fix it now. >>> >>> >>> Changes in v2: >>> - Add nand_whr_delay() helper >>> Wait for tWHR only for drivers that explicitly set NAND_WAIT_TWHR flag >>> - newly added >>> >>> Masahiro Yamada (2): >>> mtd: nand: wait for tWHR after NAND_CMD_STATUS / NAND_CMD_READID >> >> Hm, I thought you were introducing this to then use it in the denali >> driver. Sorry, but I don't want to apply something that nobody needs. >> If someone ever complains about a missing delay I'll point him to your >> patch, but until then I'll keep the core unchanged. > > Perhaps, Marc Gonzalez is the person. > > > tango_nand.c is the only driver that sets NAND_WAIT_TCCS. > > Now, there is completely no delay when reading out the ID. > > > One safe change might be apply this patch, > then set NAND_WAIT_TWHR to tango_nand.c > > > I am guessing NAND_WAIT_TCCS was added for it. > Theoretically, I do not see logical difference between tCCS and tWHR. > > I am CCing Marc Gonzalez, the author of tango_nand.c Hello Masahiro, I remember having issues reading the ONFI ID when I was writing the driver, a year ago. Sometimes, the first few bytes appeared to be missing. This looked like a timing issue. Adding the dev_ready call-back solved the problem. Do you think that was by accident? When I have more time, I will test the 4.14 branch, to see if there are any issues with the current driver. Regards.