Skip to contentSkip to conversation

mtd: m25p80: Disable 4K erase for s25sl032p, s25sl064p

PATCH Applied Marek Vasut 2 participants 4 messages Sep 4, 2012 – Sep 21, 2012 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: m25p80: Disable 4K erase for s25sl032p, s25sl064p

Quoting from the datasheet for S25FL064P, rev. 05, Nov 18 2011, section 9.17:

A 64 kB sector erase (D8h) command issued on 4 kB or 8 kB erase sectors will erase all sectors in the specified 64 kB region. However, please note that a 4 kB sector erase (20h) or 8 kB sector erase (40h) command will not work on a 64 kB sector.

Refering further to Table 8.1 and Table 8.2, it is clearly seen that most of the sectors are 64kB, therefore disable this 4K erase support since it's valid only on first/last sectors.

Cc Artem Bityutskiy <[email protected]>
Cc David Woodhouse <[email protected]>
---
 drivers/mtd/devices/m25p80.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/devices/m25p80.c +2 -2
index c433051..9930e23 100644
@@ -661,8 +661,8 @@ static const struct spi_device_id m25p_ids[] = {
 	/* Spansion -- single (large) sector size only, at least
 	 * for the chips listed here (without boot sectors).
 	 */
-	{ "s25sl032p",  INFO(0x010215, 0x4d00,  64 * 1024,  64, SECT_4K) },
-	{ "s25sl064p",  INFO(0x010216, 0x4d00,  64 * 1024, 128, SECT_4K) },
+	{ "s25sl032p",  INFO(0x010215, 0x4d00,  64 * 1024,  64, 0) },
+	{ "s25sl064p",  INFO(0x010216, 0x4d00,  64 * 1024, 128, 0) },
 	{ "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) },
 	{ "s25fl256s1", INFO(0x010219, 0x4d01,  64 * 1024, 512, 0) },
 	{ "s25fl512s",  INFO(0x010220, 0x4d00, 256 * 1024, 256, 0) },
Signature · 1 line
1.7.10.4
#1 lore raw

Bump, do you think this can be queued for 3.7 please?

Quoted 24 lines

Quoting from the datasheet for S25FL064P, rev. 05, Nov 18 2011, section 9.17:

A 64 kB sector erase (D8h) command issued on 4 kB or 8 kB erase sectors will erase all sectors in the specified 64 kB region. However, please note that a 4 kB sector erase (20h) or 8 kB sector erase (40h) command will not work on a 64 kB sector.

Refering further to Table 8.1 and Table 8.2, it is clearly seen that most of the sectors are 64kB, therefore disable this 4K erase support since it's valid only on first/last sectors.

Cc Artem Bityutskiy <[email protected]>
Cc David Woodhouse <[email protected]>
---
 drivers/mtd/devices/m25p80.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/devices/m25p80.c +0 -0
index c433051..9930e23 100644

drivers/mtd/devices/m25p80.c static const struct spi_device_id m25p_ids[] = { · line 668

Quoted 10 lines
drivers/mtd/devices/m25p80.c +2 -2
@@ -661,8 +661,8 @@ static const struct spi_device_id m25p_ids[] = {
 	/* Spansion -- single (large) sector size only, at least
 	 * for the chips listed here (without boot sectors).
 	 */
-	{ "s25sl032p",  INFO(0x010215, 0x4d00,  64 * 1024,  64, SECT_4K) },
-	{ "s25sl064p",  INFO(0x010216, 0x4d00,  64 * 1024, 128, SECT_4K) },
+	{ "s25sl032p",  INFO(0x010215, 0x4d00,  64 * 1024,  64, 0) },
+	{ "s25sl064p",  INFO(0x010216, 0x4d00,  64 * 1024, 128, 0) },
 	{ "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) },
 	{ "s25fl256s1", INFO(0x010219, 0x4d01,  64 * 1024, 512, 0) },
 	{ "s25fl512s",  INFO(0x010220, 0x4d00, 256 * 1024, 256, 0) },

Best regards,
Marek Vasut

#2 lore raw
In reply to Marek Vasut
Quoted 11 lines · Marek Vasut

Quoting from the datasheet for S25FL064P, rev. 05, Nov 18 2011, section 9.17:

A 64 kB sector erase (D8h) command issued on 4 kB or 8 kB erase sectors will erase all sectors in the specified 64 kB region. However, please note that a 4 kB sector erase (20h) or 8 kB sector erase (40h) command will not work on a 64 kB sector.

Refering further to Table 8.1 and Table 8.2, it is clearly seen that most of the sectors are 64kB, therefore disable this 4K erase support since it's valid only on first/last sectors.

Pushed to l2-mtd.git, thanks!

Signature · 2 lines
Best Regards,
Artem Bityutskiy
#3 lore raw

Dear Artem Bityutskiy,

Quoted 9 lines · Marek Vasut
Quoted 8 lines

Quoting from the datasheet for S25FL064P, rev. 05, Nov 18 2011, section 9.17:

A 64 kB sector erase (D8h) command issued on 4 kB or 8 kB erase sectors will erase all sectors in the specified 64 kB region. However, please note that a 4 kB sector erase (20h) or 8 kB sector erase (40h) command will not work on a 64 kB sector.

Quoted 5 lines
Quoted 3 lines

Refering further to Table 8.1 and Table 8.2, it is clearly seen that most of the sectors are 64kB, therefore disable this 4K erase support since it's valid only on first/last sectors.

Pushed to l2-mtd.git, thanks!

Thank you!

Best regards,
Marek Vasut