diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_sf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/cmd_sf.c b/common/cmd_sf.c index 34844ac..4af0f0a 100644 --- a/common/cmd_sf.c +++ b/common/cmd_sf.c @@ -160,7 +160,8 @@ static const char *spi_flash_update_block(struct spi_flash *flash, u32 offset, *skipped += len; return NULL; } - if (spi_flash_erase(flash, offset, len)) + /* Erase the entire sector */ + if (spi_flash_erase(flash, offset, flash->sector_size)) return "erase"; if (spi_flash_write(flash, offset, len, buf)) return "write"; |