]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: spi-nor: fix erase_type array to indicate current map conf
authorTudor Ambarus <tudor.ambarus@microchip.com>
Mon, 26 Nov 2018 12:45:44 +0000 (12:45 +0000)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Wed, 28 Nov 2018 08:00:00 +0000 (09:00 +0100)
commitfc0e27f0aaaead9240dfca8e8b4833906b4ce507
tree74f5e717685aafca4ccabd0c8e818a40da2843ff
parentc1cd78c0e0fca39e5e5c6c6ccb3b1437a1beeacd
mtd: spi-nor: fix erase_type array to indicate current map conf

BFPT advertises all the erase types supported by all the possible
map configurations. Mask out the erase types that are not supported
by the current map configuration.

Backward compatibility test done on sst26vf064b.

Fixes: 4aef040d9916 ("mtd: spi-nor: parse SFDP Sector Map Parameter Table")
Reported-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Tested-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/spi-nor/spi-nor.c