Commit 3011fe9
committed
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: 5390a8d ("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>
(cherry picked from commit e8828ec)
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>1 parent 75d2a97 commit 3011fe9
1 file changed
Lines changed: 36 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2469 | 2469 | | |
2470 | 2470 | | |
2471 | 2471 | | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
2472 | 2500 | | |
2473 | 2501 | | |
2474 | 2502 | | |
| |||
2484 | 2512 | | |
2485 | 2513 | | |
2486 | 2514 | | |
2487 | | - | |
2488 | | - | |
2489 | 2515 | | |
2490 | 2516 | | |
2491 | 2517 | | |
2492 | 2518 | | |
2493 | 2519 | | |
2494 | | - | |
2495 | | - | |
2496 | | - | |
2497 | | - | |
2498 | | - | |
2499 | | - | |
| 2520 | + | |
| 2521 | + | |
2500 | 2522 | | |
2501 | 2523 | | |
2502 | 2524 | | |
| |||
2926 | 2948 | | |
2927 | 2949 | | |
2928 | 2950 | | |
2929 | | - | |
| 2951 | + | |
2930 | 2952 | | |
2931 | 2953 | | |
2932 | 2954 | | |
| |||
2939 | 2961 | | |
2940 | 2962 | | |
2941 | 2963 | | |
2942 | | - | |
| 2964 | + | |
2943 | 2965 | | |
2944 | 2966 | | |
2945 | 2967 | | |
| |||
2954 | 2976 | | |
2955 | 2977 | | |
2956 | 2978 | | |
2957 | | - | |
| 2979 | + | |
2958 | 2980 | | |
2959 | 2981 | | |
2960 | 2982 | | |
2961 | 2983 | | |
2962 | 2984 | | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
2963 | 2988 | | |
2964 | 2989 | | |
2965 | 2990 | | |
| |||
0 commit comments