mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] m25p80: set the correct erasesize when we use  OPCODE_BE_4K
@ 2011-11-24 14:33 Michael Grzeschik
  0 siblings, 0 replies; only message in thread
From: Michael Grzeschik @ 2011-11-24 14:33 UTC (permalink / raw)
  To: barebox

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 drivers/nor/m25p80.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/nor/m25p80.c b/drivers/nor/m25p80.c
index e6fe75e..92b07af 100644
--- a/drivers/nor/m25p80.c
+++ b/drivers/nor/m25p80.c
@@ -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;
 
-- 
1.7.7.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-24 14:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-24 14:33 [PATCH] m25p80: set the correct erasesize when we use OPCODE_BE_4K Michael Grzeschik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox