aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/mtd/spi-nor/core.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2023-03-28 17:41:03 +0200
committerTudor Ambarus <tudor.ambarus@linaro.org>2023-03-29 13:46:07 +0300
commit4eddee70140b3ae183398b246a609756546c51f1 (patch)
tree67b35052e84c31915781c67561a0cc2d45644c5e /drivers/mtd/spi-nor/core.c
parentmtd: spi-nor: Prepare the introduction of a new locking mechanism (diff)
downloadwireguard-linux-4eddee70140b3ae183398b246a609756546c51f1.tar.xz
wireguard-linux-4eddee70140b3ae183398b246a609756546c51f1.zip
mtd: spi-nor: Add a RWW flag
Introduce a new (no SFDP) flag for the feature that we are about to support: Read While Write. This means, if the chip has several banks and supports RWW, once a page of data to write has been transferred into the chip's internal SRAM, another read operation happening on a different bank can be performed during the tPROG delay. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20230328154105.448540-7-miquel.raynal@bootlin.com Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Diffstat (limited to 'drivers/mtd/spi-nor/core.c')
-rw-r--r--drivers/mtd/spi-nor/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index daed09950ee1..75ec7a3d0b43 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -2530,6 +2530,9 @@ static void spi_nor_init_flags(struct spi_nor *nor)
if (flags & NO_CHIP_ERASE)
nor->flags |= SNOR_F_NO_OP_CHIP_ERASE;
+
+ if (flags & SPI_NOR_RWW)
+ nor->flags |= SNOR_F_RWW;
}
/**