From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: Alexander Dahl <ada@thorsis.com>, <linux-kernel@vger.kernel.org>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
Tudor Ambarus <tudor.ambarus@linaro.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
<linux-mtd@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] mtd: nand: raw: atmel: Fix comment in timings preparation
Date: Mon, 26 Feb 2024 13:54:58 +0100 [thread overview]
Message-ID: <b4fadbb7-5263-4271-9728-b25cc78ebad0@microchip.com> (raw)
In-Reply-To: <20240226122537.75097-1-ada@thorsis.com>
On 26/02/2024 at 13:25, Alexander Dahl wrote:
> 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 <ada@thorsis.com>
Looks indeed valid:
Reviewed-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Thanks Alexander. Best regards,
Nicolas
> ---
> drivers/mtd/nand/raw/atmel/nand-controller.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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);
>
> base-commit: d206a76d7d2726f3b096037f2079ce0bd3ba329b
> --
> 2.39.2
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2024-02-26 12:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 12:25 [PATCH] mtd: nand: raw: atmel: Fix comment in timings preparation Alexander Dahl
2024-02-26 12:54 ` Nicolas Ferre [this message]
2024-03-07 17:28 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4fadbb7-5263-4271-9728-b25cc78ebad0@microchip.com \
--to=nicolas.ferre@microchip.com \
--cc=ada@thorsis.com \
--cc=bbrezillon@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=tudor.ambarus@linaro.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox