mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
sf: fix stmicro offset setup while erasing
Reported-by: Peter Gombos <gombos@protecta.hu> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
d394a77950
commit
fcffb680e7
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue