diff options
Diffstat (limited to 'src/drivers/spi/eon.c')
-rw-r--r-- | src/drivers/spi/eon.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/drivers/spi/eon.c b/src/drivers/spi/eon.c index f6db9e377c..eb71c6216e 100644 --- a/src/drivers/spi/eon.c +++ b/src/drivers/spi/eon.c @@ -91,9 +91,9 @@ static int eon_write(const struct spi_flash *flash, u8 cmd[4]; page_size = 1 << eon->params->page_size; - byte_addr = offset % page_size; for (actual = 0; actual < len; actual += chunk_len) { + byte_addr = offset % page_size; chunk_len = min(len - actual, page_size - byte_addr); chunk_len = spi_crop_chunk(sizeof(cmd), chunk_len); @@ -128,7 +128,6 @@ static int eon_write(const struct spi_flash *flash, } offset += chunk_len; - byte_addr = 0; } #if CONFIG_DEBUG_SPI_FLASH |