summaryrefslogtreecommitdiff
path: root/include/spi-mem.h
diff options
context:
space:
mode:
authorMikhail Kshevetskiy <[email protected]>2025-09-30 03:21:03 +0300
committerMichael Trimarchi <[email protected]>2025-10-05 20:26:22 +0200
commitccc6b42adcabd0fb16103410985dae7d96f2036a (patch)
treea2a148768bee451a5390d57b1888de6be68552e4 /include/spi-mem.h
parent37f0fc45f51d2c21dd117331ffdd72c94bd53d7f (diff)
mtd: spinand: Enhance the logic when picking a variant
Currently the best variant picked in the first one in the list provided in the manufacturer driver. This worked well while all operations where performed at the same speed, but with the introduction of DTR transfers this no longer works correctly. Let's continue iterating over all the alternatives, even if we find a match, keeping a reference over the theoretically fastest operation. Only at the end we can tell which variant is the best. This logic happening only once at boot. The patch is based on linux commit 666c299be696 (mtd: spinand: Enhance the logic when picking a variant) created by Miquel Raynal <[email protected]> The code was a bit restricted in the functionality since not all required functionality is supported in the u-boot. Signed-off-by: Mikhail Kshevetskiy <[email protected]> Reviewed-by: Frieder Schrempf <[email protected]> Signed-off-by: Michael Trimarchi <[email protected]>
Diffstat (limited to 'include/spi-mem.h')
-rw-r--r--include/spi-mem.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/spi-mem.h b/include/spi-mem.h
index e68e2b50e85..36281a62f77 100644
--- a/include/spi-mem.h
+++ b/include/spi-mem.h
@@ -392,6 +392,7 @@ bool spi_mem_default_supports_op(struct spi_mem *mem,
#endif /* __UBOOT__ */
int spi_mem_adjust_op_size(struct spi_slave *slave, struct spi_mem_op *op);
+u64 spi_mem_calc_op_duration(struct spi_mem_op *op);
bool spi_mem_supports_op(struct spi_slave *slave, const struct spi_mem_op *op);
bool spi_mem_dtr_supports_op(struct spi_slave *slave,