diff mbox series

[v2,22/27] mtd: spinand: Add an optional frequency to read from cache macros

Message ID 20241224-winbond-6-11-rc1-quad-support-v2-22-ad218dbc406f@bootlin.com (mailing list archive)
State New
Headers show
Series spi-nand/spi-mem DTR support | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR fail PR summary
conchuod/patch-22-test-1 fail .github/scripts/patches/tests/build_rv32_defconfig.sh took 121.64s
conchuod/patch-22-test-2 fail .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh took 996.36s
conchuod/patch-22-test-3 fail .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh took 1218.62s
conchuod/patch-22-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh took 20.96s
conchuod/patch-22-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh took 23.14s
conchuod/patch-22-test-6 success .github/scripts/patches/tests/checkpatch.sh took 0.46s
conchuod/patch-22-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh took 43.44s
conchuod/patch-22-test-8 success .github/scripts/patches/tests/header_inline.sh took 0.01s
conchuod/patch-22-test-9 success .github/scripts/patches/tests/kdoc.sh took 0.56s
conchuod/patch-22-test-10 success .github/scripts/patches/tests/module_param.sh took 0.01s
conchuod/patch-22-test-11 success .github/scripts/patches/tests/verify_fixes.sh took 0.00s
conchuod/patch-22-test-12 success .github/scripts/patches/tests/verify_signedoff.sh took 0.04s

Commit Message

Miquel Raynal Dec. 24, 2024, 5:06 p.m. UTC
While the SPINAND_PAGE_READ_FROM_CACHE_FAST_OP macro is supposed to be
able to run at the flash highest supported frequency, it is not the case
of the regular read from cache, which may be limited in terms of maximum
frequency. Add an optional argument to this macro, which will be used to
set the maximum frequency, if any.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 include/linux/mtd/spinand.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h
index 63c89307c86524143913660c66ec4fe4375904f8..1948e654b8aacb3d4b774a00939e8e8198f53da7 100644
--- a/include/linux/mtd/spinand.h
+++ b/include/linux/mtd/spinand.h
@@ -62,11 +62,12 @@ 
 		   SPI_MEM_OP_NO_DUMMY,					\
 		   SPI_MEM_OP_NO_DATA)
 
-#define SPINAND_PAGE_READ_FROM_CACHE_OP(addr, ndummy, buf, len) \
+#define SPINAND_PAGE_READ_FROM_CACHE_OP(addr, ndummy, buf, len, ...) \
 	SPI_MEM_OP(SPI_MEM_OP_CMD(0x03, 1),				\
 		   SPI_MEM_OP_ADDR(2, addr, 1),				\
 		   SPI_MEM_OP_DUMMY(ndummy, 1),				\
-		   SPI_MEM_OP_DATA_IN(len, buf, 1))
+		   SPI_MEM_OP_DATA_IN(len, buf, 1),			\
+		   __VA_OPT__(SPI_MEM_OP_MAX_FREQ(__VA_ARGS__)))
 
 #define SPINAND_PAGE_READ_FROM_CACHE_FAST_OP(addr, ndummy, buf, len) \
 	SPI_MEM_OP(SPI_MEM_OP_CMD(0x0b, 1),			\