linux/drivers/mtd/spi-nor
Tudor Ambarus 39d1e3340c
mtd: spi-nor: Fix clearing of QE bit on lock()/unlock()
Make sure that when doing a lock() or an unlock() operation we don't clear
the QE bit from Status Register 2.

JESD216 revB or later offers information about the *default* Status
Register commands to use (see BFPT DWORDS[15], bits 22:20). In this
standard, Status Register 1 refers to the first data byte transferred on a
Read Status (05h) or Write Status (01h) command. Status register 2 refers
to the byte read using instruction 35h. Status register 2 is the second
byte transferred in a Write Status (01h) command.

Industry naming and definitions of these Status Registers may differ.
The definitions are described in JESD216B, BFPT DWORDS[15], bits 22:20.
There are cases in which writing only one byte to the Status Register 1
has the side-effect of clearing Status Register 2 and implicitly the Quad
Enable bit. This side-effect is hit just by the
BFPT_DWORD15_QER_SR2_BIT1_BUGGY and BFPT_DWORD15_QER_SR2_BIT1 cases.

Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
2019-11-11 08:55:25 +02:00
..
aspeed-smc.c mtd: spi-nor: Introduce 'struct spi_nor_controller_ops' 2019-10-23 09:27:21 +03:00
cadence-quadspi.c mtd: spi-nor: cadence-quadspi: Fix cqspi_command_read() definition 2019-10-23 09:27:21 +03:00
hisi-sfc.c mtd: spi-nor: Introduce 'struct spi_nor_controller_ops' 2019-10-23 09:27:21 +03:00
intel-spi-pci.c mtd: spi-nor: intel-spi: Add support for Intel Comet Lake-H SPI serial flash 2019-11-02 12:16:36 +02:00
intel-spi-platform.c mtd: spi-nor: intel-spi: Convert to use SPDX identifier 2019-06-22 14:59:27 +03:00
intel-spi.c mtd: spi-nor: Introduce 'struct spi_nor_controller_ops' 2019-10-23 09:27:21 +03:00
intel-spi.h mtd: spi-nor: intel-spi: Convert to use SPDX identifier 2019-06-22 14:59:27 +03:00
Kconfig mtd: spi-nor: Move m25p80 code in spi-nor.c 2019-08-12 10:54:12 +03:00
Makefile mtd: spi-nor: stm32: remove the driver as it was replaced by spi-stm32-qspi.c 2019-06-07 07:10:38 +03:00
mtk-quadspi.c mtd: spi-nor: Introduce 'struct spi_nor_controller_ops' 2019-10-23 09:27:21 +03:00
nxp-spifi.c mtd: spi-nor: Introduce 'struct spi_nor_controller_ops' 2019-10-23 09:27:21 +03:00
spi-nor.c mtd: spi-nor: Fix clearing of QE bit on lock()/unlock() 2019-11-11 08:55:25 +02:00