From: Michael Grzeschik <m.grzeschik@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] m25p80: set the correct erasesize when we use OPCODE_BE_4K
Date: Thu, 24 Nov 2011 15:33:24 +0100 [thread overview]
Message-ID: <20111124143324.GA4657@pengutronix.de> (raw)
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
reply other threads:[~2011-11-24 14:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111124143324.GA4657@pengutronix.de \
--to=m.grzeschik@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox