Skip to contentSkip to conversation

mtd: Correct 4-byte address mode enable

PATCH New Jonas Andersson 1 participant 1 message May 23, 2013 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: Correct 4-byte address mode enable

Micron SPI flashes uses command B7/E9 to enter/exit 4-byte mode. Write enable must be issued before command.

---
 drivers/mtd/devices/m25p80.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mtd/devices/m25p80.c +2 -0
index 2f3d2a5..c296cb7
@@ -160,6 +160,8 @@ static inline int write_disable(struct m25p *flash)
 static inline int set_4byte(struct m25p *flash, u32 jedec_id, int enable)
 {
 	switch (JEDEC_MFR(jedec_id)) {
+	case 0x20:
+		write_enable(flash);
 	case CFI_MFR_MACRONIX:
 	case 0xEF /* winbond */:
 		flash->command[0] = enable ? OPCODE_EN4B : OPCODE_EX4B;
Signature · 1 line
1.8.1.4