From patchwork Mon Feb 26 12:25:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Dahl X-Patchwork-Id: 13572053 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 35914C48BF6 for ; Mon, 26 Feb 2024 12:26:16 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=RIrhRqv9/FMsTagIkoN7w2tywIbbfpq++Qkkz+phN8s=; b=KOq c9iiOTdE3r7BscAak/7RpNL/qmR0G4ohPILKn4ErQRG/IjaMWGtxcA//bLtNS+L3pPv3IJ5IdrqD6 sykno+5AI+zXkoyZqc8yVrI61s1I2OzakClSlPsxiMFugBqDnuv7sgRUH04RoeAwzeGOj0zaLUfai uJ8MVVOQzfqd8mhS5ey52tisqPslZ7S84NVTVqqAvlF8U6QZFKQdDqdz08eY+8bzaAQwC011AdRT/ jx6f0J4mvRLc0BfmRxDfhh/cwQrkK4KXKVwLdZ8kLWp08hXGJtys+OHKE53V/YHUAqCnB1p/gICWO dxKqs5qMt+ZkGRszmA44hzJZEvZqpPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rea3Y-00000000Yws-07uP; Mon, 26 Feb 2024 12:26:04 +0000 Received: from mail.thorsis.com ([92.198.35.195]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rea3Q-00000000Yq6-3LkL; Mon, 26 Feb 2024 12:26:02 +0000 From: Alexander Dahl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=default; t=1708950344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-transfer-encoding:content-transfer-encoding; bh=lI4ikcSlVF3UUdLk19htP1QoiLwNpscT9ljbxdrNkVo=; b=O7s4FlkVwvaM6fZGJCet6vxeso9C4vvLVz47WSNwAKRXBRLmVbRQOxfG4lzjPKxZ/lQmos tvB1Xs0VlKGGXtAsc8/MR86rmoyIXGGHzVt5GPSeMNFKlhHNfdN2tNYWl0ANYtF+BEC0Xb qWIan+y4738eD+0uyq69XDejl3RADeCiTXV0S5+Q/vEzOYUqqyjErNizUxLym9FECb8tP/ 1F/0zSh37rk/HFD4MHfTUUf0tmBxOpLiFgWe/A21YBpPJmo24mRXjOx7cmr/94l3qXry4L eAc4NJr0SMyJ/y0ur2ep4Dua5aPDE4LY59WoTgB2yu2JhXARmxk0/qjCJzAIzg== To: linux-kernel@vger.kernel.org Subject: [PATCH] mtd: nand: raw: atmel: Fix comment in timings preparation Date: Mon, 26 Feb 2024 13:25:37 +0100 Message-Id: <20240226122537.75097-1-ada@thorsis.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240226_042557_275937_5CFF5673 X-CRM114-Status: UNSURE ( 9.28 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vignesh Raghavendra , Boris Brezillon , Tudor Ambarus , linux-mtd@lists.infradead.org, Miquel Raynal , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Looks like a copy'n'paste mistake introduced when initially adding the dynamic timings feature with commit f9ce2eddf176 ("mtd: nand: atmel: Add ->setup_data_interface() hooks"). The context around this and especially the code itself suggests 'read' is meant instead of write. Signed-off-by: Alexander Dahl Reviewed-by: Nicolas Ferre --- drivers/mtd/nand/raw/atmel/nand-controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: d206a76d7d2726f3b096037f2079ce0bd3ba329b diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c index 4cb478bbee4a..dc75d50d52e8 100644 --- a/drivers/mtd/nand/raw/atmel/nand-controller.c +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c @@ -1370,23 +1370,23 @@ static int atmel_smc_nand_prepare_smcconf(struct atmel_nand *nand, * * NRD_PULSE = tRP */ ncycles = DIV_ROUND_UP(conf->timings.sdr.tRP_min, mckperiodps); totalcycles += ncycles; ret = atmel_smc_cs_conf_set_pulse(smcconf, ATMEL_SMC_NRD_SHIFT, ncycles); if (ret) return ret; /* - * The write cycle timing is directly matching tWC, but is also + * The read cycle timing is directly matching tRC, but is also * dependent on the setup and hold timings we calculated earlier, * which gives: * * NRD_CYCLE = max(tRC, NRD_PULSE + NRD_HOLD) * * NRD_SETUP is always 0. */ ncycles = DIV_ROUND_UP(conf->timings.sdr.tRC_min, mckperiodps); ncycles = max(totalcycles, ncycles); ret = atmel_smc_cs_conf_set_cycle(smcconf, ATMEL_SMC_NRD_SHIFT, ncycles);