alistair23-linux/drivers/mtd
Tudor.Ambarus@microchip.com e8828ec1c0 mtd: spi-nor: fix selection of uniform erase type in flexible conf
There are uniform, non-uniform and flexible erase flash configurations.

The non-uniform erase types, are the erase types that can _not_ erase
the entire flash by their own.

As the code was, in case flashes had flexible erase capabilities
(support both uniform and non-uniform erase types in the same flash
configuration) and supported multiple uniform erase type sizes, the
code did not sort the uniform erase types, and could select a wrong
erase type size.

Sort the uniform erase mask in case of flexible erase flash
configurations, in order to select the best uniform erase type size.

Uniform, non-uniform, and flexible configurations with just a valid
uniform erase type, are not affected by this change.

Uniform erase tested on mx25l3273fm2i-08g and sst26vf064B-104i/sn.
Non uniform erase tested on sst26vf064B-104i/sn.

Fixes: 5390a8df76 ("mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-11-20 14:26:59 +01:00
..
chips
devices mtd: docg3: don't set conflicting BCH_CONST_PARAMS option 2018-11-05 09:20:37 +01:00
lpddr
maps mtd: sa1100: avoid VLA in sa1100_setup_mtd 2018-11-06 10:38:17 +01:00
nand mtd: rawnand: qcom: Namespace prefix some commands 2018-11-18 08:10:47 +01:00
parsers
spi-nor mtd: spi-nor: fix selection of uniform erase type in flexible conf 2018-11-20 14:26:59 +01:00
tests mtd: rawnand: Allow selection of ECC byte ordering at runtime 2018-10-03 11:12:25 +02:00
ubi ubi: Mark expected switch fall-throughs 2018-10-23 13:46:48 +02:00
afs.c
ar7part.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
bcm47xxpart.c
bcm63xxpart.c
cmdlinepart.c
ftl.c
inftlcore.c
inftlmount.c
Kconfig
Makefile
mtd_blkdevs.c mtd_blkdevs: convert to blk-mq 2018-10-16 08:09:58 -06:00
mtdblock.c
mtdblock_ro.c
mtdchar.c
mtdconcat.c
mtdcore.c
mtdcore.h
mtdoops.c
mtdpart.c mtd: partitions: fix unbalanced of_node_get/put() 2018-09-17 16:23:12 +02:00
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
ofpart.c
redboot.c
rfd_ftl.c
sm_ftl.c mtd: rawnand: Allow selection of ECC byte ordering at runtime 2018-10-03 11:12:25 +02:00
sm_ftl.h
ssfdc.c