This flash part actually has 4 block protection bits.

Please note, that this patch is just based on information of the
datasheet of the datasheet and wasn't tested.

Reported-by: Tudor Ambarus <[email protected]>
Fixes: 3e0930f109e7 ("mtd: spi-nor: Rework the disabling of block write 
protection")
Signed-off-by: Michael Walle <[email protected]>
Reviewed-by: Tudor Ambarus <[email protected]>
---
changes since v7:
 - removed Cc: stable
 - added Fixes: tag
 - added note in commit message about not being tested on real hardware

changes since v6:
 - new patch

 drivers/mtd/spi-nor/sst.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/sst.c b/drivers/mtd/spi-nor/sst.c
index e0af6d25d573..0ab07624fb73 100644
--- a/drivers/mtd/spi-nor/sst.c
+++ b/drivers/mtd/spi-nor/sst.c
@@ -18,7 +18,8 @@ static const struct flash_info sst_parts[] = {
                              SECT_4K | SST_WRITE) },
        { "sst25vf032b", INFO(0xbf254a, 0, 64 * 1024, 64,
                              SECT_4K | SST_WRITE) },
-       { "sst25vf064c", INFO(0xbf254b, 0, 64 * 1024, 128, SECT_4K) },
+       { "sst25vf064c", INFO(0xbf254b, 0, 64 * 1024, 128,
+                             SECT_4K | SPI_NOR_4BIT_BP) },
        { "sst25wf512",  INFO(0xbf2501, 0, 64 * 1024,  1,
                              SECT_4K | SST_WRITE) },
        { "sst25wf010",  INFO(0xbf2502, 0, 64 * 1024,  2,
-- 
2.20.1

Reply via email to