]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: spi-mem: Take into account the actual maximum frequency
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 4 Jun 2025 13:52:19 +0000 (15:52 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 30 Jul 2025 09:32:05 +0000 (11:32 +0200)
commita11a51896572273d04a9f6011ad22738c52ba554
treef371d843414c1d2d63353a120f76ee5d764ac595
parent62df72a0ab22b3377aeba3b2159ab35274a4106f
spi: spi-mem: Take into account the actual maximum frequency

In order to pick the best variant, the duration of each typical
operation is derived and then compared. These durations are based on the
maximum capabilities of the chips, which are commonly the limiting
factors. However there are other possible limiting pieces, such as the
hardware layout, EMC considerations and in some cases, the SPI controller
itself.

We need to take this into account to further refine our variant choice,
so let's use the actual frequency that will be used for the operation
instead of the theoretical maximum.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
drivers/mtd/nand/spi/core.c
drivers/spi/spi-mem.c
include/linux/spi/spi-mem.h