From: Olivier Sobrie <olivier@sobrie.be>
To: "Miquel Raynal (DAVE)" <miquel.raynal@bootlin.com>
Cc: Michal Simek <michal.simek@amd.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Andrea Scian <andrea.scian@dave.eu>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] mtd: rawnand: pl353: Update timings at the right moment
Date: Wed, 3 Jun 2026 07:48:47 +0200 [thread overview]
Message-ID: <ah_AP9Sx9R1i5Q2x@padoso> (raw)
In-Reply-To: <20260529-dave-upstream-nand-fixes-v1-1-8c72aa23aee2@bootlin.com>
Hello Miquel,
On Fri, May 29, 2026 at 06:29:56PM +0200, Miquel Raynal (DAVE) wrote:
> If several CE are wired, we would write the registers for every chip one
> after the other, and reselect the correct timings for the first chip the
> use wants to use after probe. This is not exactly efficient and could
> slightly be improved since we already have a helper that applies the
> configuration if there is a chip change. Instead of programming the
> registers in ->setup_interface(), let's just drop the pointer to the
> chip and let the nand_select_target() helper do its magic.
>
> Cc: Olivier Sobrie <olivier@sobrie.be>
> Signed-off-by: Miquel Raynal (DAVE) <miquel.raynal@bootlin.com>
> ---
> Olivier,
>
> This is an enhancement to your previous patch which already
> works. Can you please tell me if that change is okay for you?
Yes it looks good.
I tested the patch on one of my boards, it works as expected.
Acked-by: Olivier Sobrie <olivier@sobrie.be>
Tested-by: Olivier Sobrie <olivier@sobrie.be>
Thanks,
Olivier
>
> Thanks,
> Miquèl
> ---
> drivers/mtd/nand/raw/pl35x-nand-controller.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/pl35x-nand-controller.c b/drivers/mtd/nand/raw/pl35x-nand-controller.c
> index f2c65eb7a8d9..986019b42153 100644
> --- a/drivers/mtd/nand/raw/pl35x-nand-controller.c
> +++ b/drivers/mtd/nand/raw/pl35x-nand-controller.c
> @@ -862,8 +862,11 @@ static int pl35x_nfc_setup_interface(struct nand_chip *chip, int cs,
> PL35X_SMC_NAND_TAR_CYCLES(tmgs.t_ar) |
> PL35X_SMC_NAND_TRR_CYCLES(tmgs.t_rr);
>
> - writel(plnand->timings, nfc->conf_regs + PL35X_SMC_CYCLES);
> - pl35x_smc_update_regs(nfc);
> + /*
> + * Reset nfc->selected_chip so the next command will cause the timing
> + * registers to be updated in ->*_select_target().
> + */
> + nfc->selected_chip = NULL;
>
> return 0;
> }
>
> --
> 2.53.0
>
next prev parent reply other threads:[~2026-06-03 5:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 16:29 [PATCH 0/3] mtd: rawnand: pl353: Fixes and software ECC support Miquel Raynal (DAVE)
2026-05-29 16:29 ` [PATCH 1/3] mtd: rawnand: pl353: Update timings at the right moment Miquel Raynal (DAVE)
2026-06-03 5:48 ` Olivier Sobrie [this message]
2026-05-29 16:29 ` [PATCH 2/3] mtd: rawnand: pl353: Make sure we use the monolithic helpers for raw accesses Miquel Raynal (DAVE)
2026-05-29 16:29 ` [PATCH 3/3] mtd: rawnand: pl353: Fix debug prints Miquel Raynal (DAVE)
2026-06-03 8:43 ` [PATCH 0/3] mtd: rawnand: pl353: Fixes and software ECC support Michal Simek
2026-06-23 6:51 ` Michal Simek
2026-06-29 14:48 ` 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=ah_AP9Sx9R1i5Q2x@padoso \
--to=olivier@sobrie.be \
--cc=andrea.scian@dave.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=michal.simek@amd.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=thomas.petazzoni@bootlin.com \
--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
all inboxes | Powered by JetHome®