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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40FDBC433F5 for ; Mon, 13 Dec 2021 10:09:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237832AbhLMKJp (ORCPT ); Mon, 13 Dec 2021 05:09:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242333AbhLMKH1 (ORCPT ); Mon, 13 Dec 2021 05:07:27 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFA99C08EA3E; Mon, 13 Dec 2021 01:51:44 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9BB92B80E26; Mon, 13 Dec 2021 09:51:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA0F3C341DC; Mon, 13 Dec 2021 09:51:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1639389102; bh=FCuNgBFsc8u8IDHFF0BtuVwKsvSSR0VJsSfu4qlvBVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ehopoYWhCsyBiuuAMlWuSHKw5r7QL0axDYuVvXOkLHKOz1/ai7Q+AVoofRBwOdygl oA7mQNtXzb8eyghFfQxrdtjJHadSWwSTQlMLCuSSTfFS5COcRTmJOZi3hQFfQg52Qn z5B3bXlKCth10PJoMNDbB8kpI52JYVElnIUUaHwY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Herve Codina , Miquel Raynal Subject: [PATCH 5.10 086/132] mtd: rawnand: fsmc: Take instruction delay into account Date: Mon, 13 Dec 2021 10:30:27 +0100 Message-Id: <20211213092942.065275793@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211213092939.074326017@linuxfoundation.org> References: <20211213092939.074326017@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Herve Codina commit a4ca0c439f2d5ce9a3dc118d882f9f03449864c8 upstream. 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. Fixes: 4da712e70294 ("mtd: nand: fsmc: use ->exec_op()") Signed-off-by: Herve Codina Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20211119150316.43080-4-herve.codina@bootlin.com Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/raw/fsmc_nand.c | 4 ++++ 1 file changed, 4 insertions(+) --- 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 @@ -653,6 +654,9 @@ static int fsmc_exec_op(struct nand_chip instr->ctx.waitrdy.timeout_ms); break; } + + if (instr->delay_ns) + ndelay(instr->delay_ns); } return ret;