From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Mark Brown <broonie@kernel.org>
Cc: Fei Xie <fei.xie@horizon.auto>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Parshuram Thombare <pthombar@cadence.com>,
linux-spi@vger.kernel.org, linux-mtd@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/4] spi: cadence-xspi: add ACMD support for SPI NAND
Date: Fri, 25 Sep 2026 11:45:51 +0200 [thread overview]
Message-ID: <87pky1ll4g.fsf@bootlin.com> (raw)
In-Reply-To: <67f4e1a4-fc0e-4b2b-b41e-8dbb33227302@sirena.org.uk> (Mark Brown's message of "Thu, 24 Sep 2026 19:55:58 +0100")
On 24/09/2026 at 19:55:58 +01, Mark Brown <broonie@kernel.org> wrote:
> On Wed, Sep 23, 2026 at 02:12:11PM +0800, Fei Xie wrote:
>
>> The difficulty is that the hardware ACMD sequencer needs the complete
>> multi-operation sequence to be described before it is started. For
>> example, the SPI NAND core currently submits PAGE READ, status polling
>> and READ CACHE as separate spi_mem_exec_op() calls. The STIG path can
>> execute those operations individually, while the ACMD hardware combines
>> them into one programmed sequence.
>
>> Would an SPI-mem operation-sequence interface be a reasonable direction
>> to explore? The NAND core could describe the ordered operations and
>> polling condition, and the controller could either execute the sequence
>> in hardware or fall back to the existing individual operations. This
>> would keep NAND-specific knowledge out of the controller driver.
>
> I think that makes sense, that mirrors some ideas people have had for
> optimising SPI mesages in general - submit the sequence to the driver to
> see if it can do it in one, falling back to just running individual
> operations if that doesn't work. See spi_optimize_message().
The spi-mem operation-sequence interface seems very complex to handle
correctly IMHO. I fear such a solution would also require major rewrites
of the core. It is always hard to make fit hardware in code bases not
thought for them. Most of the time being spent in I/Os and wait states,
I am wondering how much would be saved by packing the commands. Do you
have benchmarks?
Thanks,
Miquèl
next prev parent reply other threads:[~2026-09-25 9:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 9:36 [RFC PATCH 0/4] spi: cadence-xspi: add ACMD PIO support for NAND and NOR Fei Xie
2026-09-21 9:36 ` [RFC PATCH 1/4] dt-bindings: spi: cdns,xspi: add SPI NAND compatible Fei Xie
2026-09-21 14:01 ` Mark Brown
2026-09-23 12:54 ` Krzysztof Kozlowski
2026-09-21 9:36 ` [RFC PATCH 2/4] spi: cadence-xspi: add ACMD support for SPI NAND Fei Xie
2026-09-21 14:51 ` Mark Brown
2026-09-23 6:12 ` Fei Xie
2026-09-24 18:55 ` Mark Brown
2026-09-25 9:45 ` Miquel Raynal [this message]
2026-09-25 10:14 ` Nuno Sá
2026-09-25 10:23 ` Miquel Raynal
2026-09-25 11:31 ` Nuno Sá
2026-09-23 12:37 ` Nuno Sá
2026-09-21 9:37 ` [RFC PATCH 3/4] spi: cadence-xspi: factor out reusable ACMD helpers Fei Xie
2026-09-21 9:37 ` [RFC PATCH 4/4] spi: cadence-xspi: add ACMD support for SPI NOR Fei Xie
2026-09-23 12:24 ` [RFC PATCH 0/4] spi: cadence-xspi: add ACMD PIO support for NAND and NOR Nuno Sá
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=87pky1ll4g.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fei.xie@horizon.auto \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=pthombar@cadence.com \
--cc=richard@nod.at \
--cc=robh@kernel.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
all inboxes | Powered by JetHome®