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

Ahmed Samir Khalil engkhalil86 at gmail.com
Sun Oct 1 01:20:39 UTC 2017


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(-)

-- 
2.7.4



More information about the U-Boot mailing list