linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] mtd: Make sure UBIFS does not do multi-pass page programming on flashes that don't support it
@ 2020-10-12 18:04 Pratyush Yadav
  2020-10-12 18:04 ` [PATCH 1/3] mtd: abi: Introduce MTD_NO_MULTI_PASS_WRITE Pratyush Yadav
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Pratyush Yadav @ 2020-10-12 18:04 UTC (permalink / raw)
  To: Tudor Ambarus, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, linux-mtd, linux-kernel
  Cc: Pratyush Yadav

Hi,

The Cypress Semper S28 flash family uses 2-bit ECC by default. Under
this ECC scheme, multi-pass page programs result in a program error.
This means that unlike many other SPI NOR flashes, bit-walking cannot be
done. In other words, once a page is programmed, its bits cannot then be
flipped to 0 without an erase in between.

This causes problems with UBIFS because it uses bit-walking to clear EC
and VID magic numbers from a PEB before issuing an erase to preserve the
file system correctness in case of power cuts.

This series fixes that problem by introducing a flag
MTD_NO_MULTI_PASS_WRITE that tells the file system layer that it can't
do multi-pass writes. It also sets the writesize to the page size for
such flashes to make sure file systems know that they should write the
entire page in one go.

It is based on the xSPI/8D series that adds support for Cypress S28
flash [0]. The patches themselves are independent of that series in the
sense that they don't rely on 8D support. But since S28 flash is not
supported without that series, these patches don't make much sense
without it.

Tested on Cypress S28HS512T and MT35XU512ABA on J7200 and J721E
respectively.

[0] https://lore.kernel.org/linux-mtd/20201005153138.6437-1-p.yadav@ti.com/

Pratyush Yadav (3):
  mtd: abi: Introduce MTD_NO_MULTI_PASS_WRITE
  UBI: Do not zero out EC and VID when multi-pass writes are not
    supported
  mtd: spi-nor: core: Introduce SPI_NOR_NO_MULTI_PASS_PP

 drivers/mtd/spi-nor/core.c     | 5 +++++
 drivers/mtd/spi-nor/core.h     | 6 ++++++
 drivers/mtd/spi-nor/spansion.c | 2 +-
 drivers/mtd/ubi/io.c           | 2 +-
 include/uapi/mtd/mtd-abi.h     | 1 +
 5 files changed, 14 insertions(+), 2 deletions(-)

--
2.28.0


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-11-05 13:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 18:04 [PATCH 0/3] mtd: Make sure UBIFS does not do multi-pass page programming on flashes that don't support it Pratyush Yadav
2020-10-12 18:04 ` [PATCH 1/3] mtd: abi: Introduce MTD_NO_MULTI_PASS_WRITE Pratyush Yadav
2020-10-12 18:04 ` [PATCH 2/3] UBI: Do not zero out EC and VID when multi-pass writes are not supported Pratyush Yadav
2020-11-03 11:48   ` Vignesh Raghavendra
2020-11-03 11:59     ` Richard Weinberger
2020-11-03 12:47       ` Pratyush Yadav
2020-10-12 18:04 ` [PATCH 3/3] mtd: spi-nor: core: Introduce SPI_NOR_NO_MULTI_PASS_PP Pratyush Yadav
2020-10-27 11:18 ` [PATCH 0/3] mtd: Make sure UBIFS does not do multi-pass page programming on flashes that don't support it Pratyush Yadav
2020-10-31 21:44   ` Richard Weinberger
2020-11-03 11:35     ` Vignesh Raghavendra
2020-11-03 12:45       ` Pratyush Yadav
2020-11-05 12:21         ` Vignesh Raghavendra
2020-11-05 13:19           ` Pratyush Yadav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).