[U-Boot] [PATCH v2 04/12] sf: Update SST flash params
Bin Meng
bmeng.cn at gmail.com
Sat Nov 1 09:54:08 CET 2014
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 at gmail.com>
---
drivers/mtd/spi/sf_internal.h | 4 +++-
drivers/mtd/spi/sf_params.c | 20 ++++++++++----------
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
index f519060..157665c 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -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 */
diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c
index 61545ca..d0ead65 100644
--- a/drivers/mtd/spi/sf_params.c
+++ b/drivers/mtd/spi/sf_params.c
@@ -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},
--
1.8.2.1
More information about the U-Boot
mailing list