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 11537C433F5 for ; Fri, 12 Nov 2021 14:54:35 +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 C585C61039 for ; Fri, 12 Nov 2021 14:54:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C585C61039 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=/patzuh0FrVOiEVxUZ3BhAfr09i+Cp8IInUR1VzA5c8=; b=p7SuMZfMKU8vMZ vjSXXQ7/CDQRIkP2FGI21v9wahi/GAt7yQ2XMg5gZxol5JbNrTQ6NarR9ILgcCx5oyf6xvUDiDNGz 4UNbMsYsBsvUv6q0goeoNUzMl73ros9HuXJc/o6cJLcIOEw+mfbi4RWB44zyR1n3oxfNKuKbeT/Ov vPEMbHKz0wF2SjAnj2qqLy2vrwWco44RJ6syqNwqkcAc8wEeTT2WWbBeu61IhuXH0hV9dafZYs+39 UDdsMnlLdDYehFig5PIhshRvvfq1/cQssfIrbPYWEnOGR50oiX5rJeQ8c8Jv6a/maWnSjTStasP4/ ImLw5HTnG0iLw4L5skBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mlXwO-00AvYO-IQ; Fri, 12 Nov 2021 14:54:08 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mlXiJ-00AqHJ-Hy for linux-mtd@lists.infradead.org; Fri, 12 Nov 2021 14:39:36 +0000 Received: (Authenticated sender: herve.codina@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPA id 7EC804000F; Fri, 12 Nov 2021 14:39:33 +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 3/4] mtd: rawnand: fsmc: Take instruction delay into account Date: Fri, 12 Nov 2021 15:38:54 +0100 Message-Id: <20211112143855.2678989-4-herve.codina@bootlin.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211112143855.2678989-1-herve.codina@bootlin.com> References: <20211112143855.2678989-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-20211112_063935_798103_C8E1DC30 X-CRM114-Status: UNSURE ( 8.76 ) 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. This patch adds this waiting delay in the FSMC nand controller driver. Signed-off-by: Herve Codina --- 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 7f057cfee6c4..bff09219ce3a 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 @@ -667,6 +668,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/