Skip to contentSkip to conversation

sf: sst: fix sector size

PATCH New Mike Frysinger 1 participant 2 messages Jun 19, 2009 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 sf: sst: fix sector size

Looks like when I was encoding the sector sizes, I forgot to divide by 8 (due to the stupid marketing driven process that declares all sizes in useless megabits and not megabytes).

---
 drivers/mtd/spi/sst.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/mtd/spi/sst.c +4 -4
index 62236d4..cf7bce8 100644
@@ -56,19 +56,19 @@ static inline struct sst_spi_flash *to_sst_spi_flash(struct spi_flash *flash)
 static const struct sst_spi_flash_params sst_spi_flash_table[] = {
 	{
 		.idcode1 = 0x01,
-		.nr_sectors = 128,
+		.nr_sectors = 16,
 		.name = "SST25WF512",
 	},{
 		.idcode1 = 0x02,
-		.nr_sectors = 256,
+		.nr_sectors = 32,
 		.name = "SST25WF010",
 	},{
 		.idcode1 = 0x03,
-		.nr_sectors = 512,
+		.nr_sectors = 64,
 		.name = "SST25WF020",
 	},{
 		.idcode1 = 0x04,
-		.nr_sectors = 1024,
+		.nr_sectors = 128,
 		.name = "SST25WF040",
 	},
 };
Signature · 1 line
1.6.3.1
#1 lore raw

PATCH 2/2 sf: sst: add sst25vf###b ids

---
 drivers/mtd/spi/sst.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
drivers/mtd/spi/sst.c +16 -0
index cf7bce8..50e9299 100644
@@ -55,6 +55,22 @@ static inline struct sst_spi_flash *to_sst_spi_flash(struct spi_flash *flash)
 #define SST_SECTOR_SIZE (4 * 1024)
 static const struct sst_spi_flash_params sst_spi_flash_table[] = {
 	{
+		.idcode1 = 0x8d,
+		.nr_sectors = 128,
+		.name = "SST25VF040B",
+	},{
+		.idcode1 = 0x8e,
+		.nr_sectors = 256,
+		.name = "SST25VF080B",
+	},{
+		.idcode1 = 0x41,
+		.nr_sectors = 512,
+		.name = "SST25VF016B",
+	},{
+		.idcode1 = 0x4a,
+		.nr_sectors = 1024,
+		.name = "SST25VF032B",
+	},{
 		.idcode1 = 0x01,
 		.nr_sectors = 16,
 		.name = "SST25WF512",
Signature · 1 line
1.6.3.1