summaryrefslogtreecommitdiff
path: root/drivers/nor
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/nor')
-rw-r--r--drivers/nor/m25p80.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/nor/m25p80.c b/drivers/nor/m25p80.c
index e6fe75e9bf..92b07af7f7 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;