projects
/
platform
/
kernel
/
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
9b910c1
..
ae0d047
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) {