diff options
author | Michael Walle <michael@walle.cc> | 2020-12-03 17:29:58 +0100 |
---|---|---|
committer | Vignesh Raghavendra <vigneshr@ti.com> | 2020-12-07 22:57:30 +0530 |
commit | 8c174d1511d235ed6c049dcb2b704777ad0df7a5 (patch) | |
tree | f25f45f2e2d37c35bde2beae1310c7e74758df0a /drivers/mtd/spi-nor/core.h | |
parent | afcf93e9d63fc1e15935a2df9457f803394e4f20 (diff) |
mtd: spi-nor: atmel: fix unlock_all() for AT25FS010/040
These flashes have some weird BP bits mapping which aren't supported in
the current locking code. Just add a simple unlock op to unprotect the
entire flash array which is needed for legacy behavior.
Fixes: 3e0930f109e7 ("mtd: spi-nor: Rework the disabling of block write protection")
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20201203162959.29589-7-michael@walle.cc
Diffstat (limited to 'drivers/mtd/spi-nor/core.h')
-rw-r--r-- | drivers/mtd/spi-nor/core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index 5ab3f269a23c..caf8b7def828 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -433,6 +433,7 @@ void spi_nor_unlock_and_unprep(struct spi_nor *nor); int spi_nor_sr1_bit6_quad_enable(struct spi_nor *nor); int spi_nor_sr2_bit1_quad_enable(struct spi_nor *nor); int spi_nor_sr2_bit7_quad_enable(struct spi_nor *nor); +int spi_nor_write_sr_and_check(struct spi_nor *nor, u8 sr1); int spi_nor_xread_sr(struct spi_nor *nor, u8 *sr); ssize_t spi_nor_read_data(struct spi_nor *nor, loff_t from, size_t len, |