Skip to content

Clear error flags & initialization of Spansion

Ahmed Samir Khalil u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5mtd: spi: Define CLSR commanddrivers/mtd/spi/sf_internal.h+3 -00 replies
2/5mtd: spi_flash: Support clearing status registerdrivers/mtd/spi/spi_flash.c+21 -01 reply
3/5mtd: spi_flash: Clear SR if write/erase error is flaggeddrivers/mtd/spi/spi_flash.c+3 -00 replies
4/5mtd: spi_flash: Clear SR error flags in case of failed writedrivers/mtd/spi/spi_flash.c+3 -00 replies
5/5mtd: spi_flash: preserve Spansion's original value during rebootdrivers/mtd/spi/spi_flash.c+2 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/5] Clear error flags & initialization of Spansion

This patchset updates serial flash initialization and clear error flags for Spansion SPI flash.

Testing these patches has been done on S25FL128S and High speed SPI Controller that do switch back & forth between different modes (legacy, dual, quad).

* spi_flash_scan: Since Spansion has BP# bits & QEB on the same register, preserving the original values is recommended. Otherwise, unstable behavior may occur. e.g. if the last mode used by the SPI controller was Quad read, while the new scan should use legacy. In such a case, garbage bytes may be read instead.

* clear_sr: A new function that is used to clear status register-1 of Spansion when write or erase error occur. Clearing SR is recommended to avoid problems with the next operation(s), such as Timeout! while it is already caused by the last operation but not the current one.

TODO: If applicable, the clear_sr() should be done for the other flash vendors too.

Ahmed Samir Khalil (5):
mtd: spi: Define CLSR command
mtd: spi_flash: Support clearing status register
mtd: spi_flash: Clear SR if write/erase error is flagged
mtd: spi_flash: Clear SR error flags in case of failed write
mtd: spi_flash: preserve Spansion's original value during reboot

 drivers/mtd/spi/sf_internal.h |  3 +++
 drivers/mtd/spi/spi_flash.c   | 30 +++++++++++++++++++++++++++++-
 2 files changed, 32 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.4