@@ -27,9 +27,11 @@ enum spi_read_cmds {
DUAL_IO_FAST = 1 << 2,
QUAD_OUTPUT_FAST = 1 << 3,
QUAD_IO_FAST = 1 << 4,
+ ARRAY_FAST = 1 << 5,
};
-#define RD_EXTN (ARRAY_SLOW | DUAL_OUTPUT_FAST | DUAL_IO_FAST)
+#define RD_BASC (ARRAY_SLOW | ARRAY_FAST)
+#define RD_EXTN (RD_BASC | DUAL_OUTPUT_FAST | DUAL_IO_FAST)
#define RD_FULL (RD_EXTN | QUAD_OUTPUT_FAST | QUAD_IO_FAST)
/* sf param flags */
@@ -89,16 +89,16 @@ const struct spi_flash_params spi_flash_params_table[] = {
{"N25Q1024A", 0x20bb21, 0x0, 64 * 1024, 2048, RD_FULL, WR_QPP | E_FSR | SECT_4K},
#endif
#ifdef CONFIG_SPI_FLASH_SST /* SST */
- {"SST25VF040B", 0xbf258d, 0x0, 64 * 1024, 8, 0, SECT_4K | SST_WP},
- {"SST25VF080B", 0xbf258e, 0x0, 64 * 1024, 16, 0, SECT_4K | SST_WP},
- {"SST25VF016B", 0xbf2541, 0x0, 64 * 1024, 32, 0, SECT_4K | SST_WP},
- {"SST25VF032B", 0xbf254a, 0x0, 64 * 1024, 64, 0, SECT_4K | SST_WP},
- {"SST25VF064C", 0xbf254b, 0x0, 64 * 1024, 128, 0, SECT_4K},
- {"SST25WF512", 0xbf2501, 0x0, 64 * 1024, 1, 0, SECT_4K | SST_WP},
- {"SST25WF010", 0xbf2502, 0x0, 64 * 1024, 2, 0, SECT_4K | SST_WP},
- {"SST25WF020", 0xbf2503, 0x0, 64 * 1024, 4, 0, SECT_4K | SST_WP},
- {"SST25WF040", 0xbf2504, 0x0, 64 * 1024, 8, 0, SECT_4K | SST_WP},
- {"SST25WF080", 0xbf2505, 0x0, 64 * 1024, 16, 0, SECT_4K | SST_WP},
+ {"SST25VF040B", 0xbf258d, 0x0, 4 * 1024, 128, RD_BASC, SECT_4K | SST_WP},
+ {"SST25VF080B", 0xbf258e, 0x0, 4 * 1024, 256, RD_BASC, SECT_4K | SST_WP},
+ {"SST25VF016B", 0xbf2541, 0x0, 4 * 1024, 512, RD_BASC, SECT_4K | SST_WP},
+ {"SST25VF032B", 0xbf254a, 0x0, 4 * 1024, 1024, RD_BASC, SECT_4K | SST_WP},
+ {"SST25VF064C", 0xbf254b, 0x0, 4 * 1024, 2048, RD_EXTN, SECT_4K},
+ {"SST25WF512", 0xbf2501, 0x0, 4 * 1024, 16, RD_BASC, SECT_4K | SST_WP},
+ {"SST25WF010", 0xbf2502, 0x0, 4 * 1024, 32, RD_BASC, SECT_4K | SST_WP},
+ {"SST25WF020", 0xbf2503, 0x0, 4 * 1024, 64, RD_BASC, SECT_4K | SST_WP},
+ {"SST25WF040", 0xbf2504, 0x0, 4 * 1024, 128, RD_BASC, SECT_4K | SST_WP},
+ {"SST25WF080", 0xbf2505, 0x0, 4 * 1024, 256, RD_BASC, SECT_4K | SST_WP},
#endif
#ifdef CONFIG_SPI_FLASH_WINBOND /* WINBOND */
{"W25P80", 0xef2014, 0x0, 64 * 1024, 16, 0, 0},
Explicitly list supported read commands in the flash prarmas table for SST flash parts. Also change flash sector size to 4KiB to match SECT_4K. This makes 'sf erase offset +len' work on real 4KiB boundary instead of 64KiB. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> --- drivers/mtd/spi/sf_internal.h | 4 +++- drivers/mtd/spi/sf_params.c | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-)