linux/drivers/mtd/spi-nor
Alexander Sverdlin c4b3eacc1d mtd: spi-nor: Recover from Spansion/Cypress errors
S25FL{128|256|512}S datasheets say:
"When P_ERR or E_ERR bits are set to one, the WIP bit will remain set to
one indicating the device remains busy and unable to receive new operation
commands. A Clear Status Register (CLSR) command must be received to return
the device to standby mode."

Current spi-nor code works until first error occurs, but write/erase errors
are not just rare hardware failures, they also occur if user tries to flash
write-protected areas. After such attempt no SPI command can be executed
any more and even read fails. This patch adds support for P_ERR and E_ERR
bits in Status Register 1 (so that operation fails immediately and not
after a long timeout) and proper recovery from the error condition.

Tested on Spansion S25FS128S, which is supported by S25FL129P entry.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
2017-08-01 21:15:33 +02:00
..
aspeed-smc.c mtd: spi-nor: aspeed: configure chip window on AHB bus 2017-06-22 00:22:51 +02:00
atmel-quadspi.c mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4 protocols 2017-05-15 21:56:17 +02:00
cadence-quadspi.c mtd: spi-nor: cqspi: remove duplicate const 2017-06-27 21:28:52 +02:00
fsl-quadspi.c mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4 protocols 2017-05-15 21:56:17 +02:00
hisi-sfc.c mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4 protocols 2017-05-15 21:56:17 +02:00
intel-spi-pci.c mtd: spi-nor: intel-spi: Add support for Intel Denverton SPI serial flash controller 2017-08-01 19:19:28 +02:00
intel-spi-platform.c spi-nor: Add support for Intel SPI serial flash controller 2017-01-03 17:33:36 +00:00
intel-spi.c mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4 protocols 2017-05-15 21:56:17 +02:00
intel-spi.h spi-nor: Add support for Intel SPI serial flash controller 2017-01-03 17:33:36 +00:00
Kconfig mtd: spi-nor: intel-spi: Add support for Intel Denverton SPI serial flash controller 2017-08-01 19:19:28 +02:00
Makefile mtd: spi-nor: intel-spi: Add support for Intel Denverton SPI serial flash controller 2017-08-01 19:19:28 +02:00
mtk-quadspi.c mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4 protocols 2017-05-15 21:56:17 +02:00
nxp-spifi.c mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4 protocols 2017-05-15 21:56:17 +02:00
spi-nor.c mtd: spi-nor: Recover from Spansion/Cypress errors 2017-08-01 21:15:33 +02:00
stm32-quadspi.c mtd: spi-nor: stm32-quadspi: fix compiler errors with COMPILE_TEST 2017-05-15 21:56:18 +02:00