From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3A1FC433EF for ; Fri, 19 Nov 2021 07:40:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 97F9861AFF for ; Fri, 19 Nov 2021 07:40:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 97F9861AFF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WFuqAXFBlzEAu1c/XbEYf+M1SB6BJWS3i2zopEbODkY=; b=mQGuuiP/Shkmdu oalMIgtPuf/tKR5e7zhJTPX6FpBsGOq+eyes5GDtS/qV0XmP/d+bxz1Wf0zG4Kg9EynjMqSI6nb7s P3i2qt7YYaQyo6Y5eyih346VOP3J2JZfrIGSpXYBUXGqK4WnP3uW5sqBidwEjnr/yp8+tTtB8F15k Ze6CncM0MYm748SEaWaKj4SghOuyNgDgA141vAvLEl02NbMsAwXgxEFeHzoo+xTxs729ozIFl+kqz yHdIw3CGsC/6AA90M8zJkSFHWhR0EkVYtxPsjQdtP5FfY91g/vnmbpBrho9+2dxBsjnWg/osCIKWB NCQEVqV+PzflYmbYpONg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnyVC-009d6f-9M; Fri, 19 Nov 2021 07:40:06 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnyUX-009cy3-0N for linux-mtd@lists.infradead.org; Fri, 19 Nov 2021 07:39:26 +0000 Received: (Authenticated sender: herve.codina@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPA id B04E920005; Fri, 19 Nov 2021 07:39:22 +0000 (UTC) From: Herve Codina To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Herve Codina , Thomas Petazzoni Subject: [PATCH v2 3/4] mtd: rawnand: fsmc: Take instruction delay into account Date: Fri, 19 Nov 2021 08:39:08 +0100 Message-Id: <20211119073909.1492538-4-herve.codina@bootlin.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211119073909.1492538-1-herve.codina@bootlin.com> References: <20211119073909.1492538-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211118_233925_217056_05620345 X-CRM114-Status: UNSURE ( 8.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org The FSMC NAND controller should apply a delay after the instruction has been issued on the bus. The FSMC NAND controller driver did not handle this delay. Add this waiting delay in the FSMC NAND controller driver. Signed-off-by: Herve Codina --- Changes v1 -> v2: - Commit log reword drivers/mtd/nand/raw/fsmc_nand.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mtd/nand/raw/fsmc_nand.c b/drivers/mtd/nand/raw/fsmc_nand.c index 658f0cbe7ce8..0a6c9ef0ea8b 100644 --- a/drivers/mtd/nand/raw/fsmc_nand.c +++ b/drivers/mtd/nand/raw/fsmc_nand.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -664,6 +665,9 @@ static int fsmc_exec_op(struct nand_chip *chip, const struct nand_operation *op, instr->ctx.waitrdy.timeout_ms); break; } + + if (instr->delay_ns) + ndelay(instr->delay_ns); } return ret; -- 2.31.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/