Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752176AbdI2OeR (ORCPT ); Fri, 29 Sep 2017 10:34:17 -0400 Received: from conssluserg-05.nifty.com ([210.131.2.90]:42679 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751349AbdI2OeQ (ORCPT ); Fri, 29 Sep 2017 10:34:16 -0400 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com v8TEY9Is005560 X-Nifty-SrcIP: [209.85.161.170] X-Google-Smtp-Source: AOwi7QB3bknSxDer6gP5NJOyoRgXtw+fp2J4K+IyaEbijxIgUoRuH/R1UTfvXB9oUuYXm99pV+Sz+pibRwxIifGESBk= MIME-Version: 1.0 In-Reply-To: <20170929142635.07d55f77@bbrezillon> References: <1506681520-13897-1-git-send-email-yamada.masahiro@socionext.com> <20170929142635.07d55f77@bbrezillon> From: Masahiro Yamada Date: Fri, 29 Sep 2017 23:33:28 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/2] mtd: nand: wait for tWHR, and fix the setup_data_interface of Denali To: Boris Brezillon Cc: linux-mtd@lists.infradead.org, Cyrille Pitchen , Linux Kernel Mailing List , Marek Vasut , Brian Norris , Richard Weinberger , David Woodhouse , Marc Gonzalez Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2244 Lines: 68 (+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 commit 6ea40a3ba93e1b14ffb349e276f9dfefc4334b99 Author: Boris Brezillon Date: Sat Oct 1 10:24:03 2016 +0200 mtd: nand: Wait tCCS after a column change Drivers implementing ->cmd_ctrl() and relying on the default ->cmdfunc() implementation usually don't wait tCCS when a column change (RNDIN or RNDOUT) is requested. Add an option flag to ask the core to do so (note that we keep this as an opt-in to avoid breaking existing implementations), and make use of the ->data_interface information is available (otherwise, wait 500ns). Signed-off-by: Boris Brezillon Tested-by: Marc Gonzalez -- Best Regards Masahiro Yamada