Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752120AbdI2OHb (ORCPT ); Fri, 29 Sep 2017 10:07:31 -0400 Received: from conssluserg-06.nifty.com ([210.131.2.91]:47070 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751224AbdI2OHa (ORCPT ); Fri, 29 Sep 2017 10:07:30 -0400 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com v8TE7NKr006885 X-Nifty-SrcIP: [209.85.161.169] X-Google-Smtp-Source: AOwi7QAcr5iEfJCHqFBd4M3sSXu2UH0U05Qu3LfD84A7Ece6cY46Vqp1SRhOddMbW4JdS6Q940kG5ajE9rUK514df8A= 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:06:42 +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 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: 1803 Lines: 63 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. At first, I thought this was necessary for me, but I realized it was my misunderstanding. Please let me explain one more. See commit 3158fa0e739615769cc047d2428f30f4c3b6640e. Prior to that commit, READID waited for #R/B transition, it was wrong, so I fixed it. However, it dropped the delay completely. If somebody was implicitly relying on the delay of chip->dev_ready, the first byte might be read out before the valid data is available. This was motivation of v1, where inserted ndelay(200) unconditionally. >> mtd: nand: denali: fix setup_data_interface to meet tCCS delay > > This one is valid. I'll queue it to nand/next soon. If you drop 1/2, please let me do v3. V2 mentions NAND_WAIT_TWHR, this is strange. -- Best Regards Masahiro Yamada