mtd: spi-nor: atmel: fix unlock_all() for AT25FS010/040
authorMichael Walle <michael@walle.cc>
Thu, 3 Dec 2020 16:29:58 +0000 (17:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:41 +0000 (11:53 +0100)
commitb9ee2a910d4418da57ed3ad79300bb02e2133b3a
tree70a62d78e9fed51c3db4f9d8b1f97c33699be730
parentd4f620ed499cdf3d7934031babd0b49f69cb87fc
mtd: spi-nor: atmel: fix unlock_all() for AT25FS010/040

[ Upstream commit 8c174d1511d235ed6c049dcb2b704777ad0df7a5 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/spi-nor/atmel.c
drivers/mtd/spi-nor/core.c
drivers/mtd/spi-nor/core.h