projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d394a77
)
sf: fix stmicro offset setup while erasing
author
Mike Frysinger
<vapier@gentoo.org>
Wed, 14 Oct 2009 23:28:03 +0000
(19:28 -0400)
committer
Wolfgang Denk
<wd@denx.de>
Sun, 22 Nov 2009 22:56:36 +0000
(23:56 +0100)
Reported-by: Peter Gombos <gombos@protecta.hu>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
drivers/mtd/spi/stmicro.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/spi/stmicro.c
b/drivers/mtd/spi/stmicro.c
index 9b910c13fd8b16f13fb92543d07f2e8e859d684e..ae0d0471f21fecf9d1836d06210f5efbdb551032 100644
(file)
--- a/
drivers/mtd/spi/stmicro.c
+++ b/
drivers/mtd/spi/stmicro.c
@@
-281,7
+281,8
@@
int stmicro_erase(struct spi_flash *flash, u32 offset, size_t len)
ret = 0;
for (actual = 0; actual < len; actual++) {
- cmd[1] = (offset / sector_size) + actual;
+ cmd[1] = offset >> 16;
+ offset += sector_size;
ret = spi_flash_cmd(flash->spi, CMD_M25PXX_WREN, NULL, 0);
if (ret < 0) {