public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ahmed Samir Khalil <engkhalil86@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/5] Clear error flags & initialization of Spansion
Date: Sun,  1 Oct 2017 03:20:39 +0200	[thread overview]
Message-ID: <cover.1506820067.git.engkhalil86@gmail.com> (raw)


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

             reply	other threads:[~2017-10-01  1:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-01  1:20 Ahmed Samir Khalil [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1506820067.git.engkhalil86@gmail.com \
    --to=engkhalil86@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox