Skip to contentSkip to conversation

m25p80: set the correct erasesize when we use OPCODE_BE_4K

PATCH New Michael Grzeschik 1 participant 1 message Nov 24, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m25p80: set the correct erasesize when we use OPCODE_BE_4K

---
 drivers/nor/m25p80.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/nor/m25p80.c +4 -2
index e6fe75e..92b07af 100644
@@ -778,10 +778,12 @@ static int m25p_probe(struct device_d *dev)
 		m25p80_ops.write = m25p80_write;
 
 	/* prefer "small sector" erase if possible */
-	if (info->flags & SECT_4K)
+	if (info->flags & SECT_4K) {
 		flash->erase_opcode = OPCODE_BE_4K;
-	else
+		flash->erasesize = 4096;
+	} else {
 		flash->erase_opcode = OPCODE_SE;
+	}
 
 	flash->page_size = info->page_size;
 
Signature · 7 lines
1.7.7.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox