public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/5] Clear error flags & initialization of Spansion
@ 2017-10-01  1:20 Ahmed Samir Khalil
  2017-10-01  1:20 ` [U-Boot] [PATCH 1/5] mtd: spi: Define CLSR command Ahmed Samir Khalil
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Ahmed Samir Khalil @ 2017-10-01  1:20 UTC (permalink / raw)
  To: u-boot


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

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

end of thread, other threads:[~2017-10-09  9:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-01  1:20 [U-Boot] [PATCH 0/5] Clear error flags & initialization of Spansion Ahmed Samir Khalil
2017-10-01  1:20 ` [U-Boot] [PATCH 1/5] mtd: spi: Define CLSR command Ahmed Samir Khalil
2017-10-01  1:20 ` [U-Boot] [PATCH 2/5] mtd: spi_flash: Support clearing status register Ahmed Samir Khalil
2017-10-09  9:45   ` Jagan Teki
2017-10-01  1:20 ` [U-Boot] [PATCH 3/5] mtd: spi_flash: Clear SR if write/erase error is flagged Ahmed Samir Khalil
2017-10-01  1:20 ` [U-Boot] [PATCH 4/5] mtd: spi_flash: Clear SR error flags in case of failed write Ahmed Samir Khalil
2017-10-01  1:20 ` [U-Boot] [PATCH 5/5] mtd: spi_flash: preserve Spansion's original value during reboot Ahmed Samir Khalil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox