[PATCH] mtd: Correct 4-byte address mode enable
Jonas Andersson
jonas at microbit.se
Thu May 23 08:23:33 EDT 2013
Micron SPI flashes uses command B7/E9 to enter/exit 4-byte mode. Write enable must be issued before command.
Signed-off-by: Jonas Andersson <jonas at microbit.se>
---
drivers/mtd/devices/m25p80.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 2f3d2a5..c296cb7
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -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;
--
1.8.1.4
More information about the linux-mtd
mailing list