[RFC][PATCH 3/3] spi-nor: Speedup mb85rs1mt FRAM writes

Richard Weinberger richard at nod.at
Sun Oct 18 17:31:03 EDT 2020


This FRAM does not internally buffer writes, as soon the write
command returns, all data is stable.
Therefore the WIP bit is always 0 and we can skip the check.

The write command accepts infinitely data, the target address will
just roll over if you feed in more bytes than the flash can handle.
To speed up bulk writes, specify a page size of the sizeof the whole
FRAM. That way the whole FRAM can be written using single program
sequence.

With this changes I was able to double the write performance on
one of my systems.

Signed-off-by: Richard Weinberger <richard at nod.at>
---
 drivers/mtd/spi-nor/fujitsu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/fujitsu.c b/drivers/mtd/spi-nor/fujitsu.c
index e385d93e756c..3152999fbaa1 100644
--- a/drivers/mtd/spi-nor/fujitsu.c
+++ b/drivers/mtd/spi-nor/fujitsu.c
@@ -10,7 +10,7 @@
 
 static const struct flash_info fujitsu_parts[] = {
 	/* Fujitsu */
-	{ "mb85rs1mt", INFO(0x047f27, 0, 128 * 1024, 1, SPI_NOR_NO_ERASE) },
+	{ "mb85rs1mt", INFO_PGZ(0x047f27, 0, 1 << 17, 1, 1 << 17, SPI_NOR_NO_ERASE | SPI_NOR_NO_WIP) },
 };
 
 const struct spi_nor_manufacturer spi_nor_fujitsu = {
-- 
2.26.1




More information about the linux-mtd mailing list