drivers: flash: mcux flexspi nor: Fix write if size > SPI_NOR_PAGE_SIZE

This fixes a bug in the write function of the MCUX FlexSPI flash driver
if the length of the data is larger than a single page.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2021-04-07 20:45:51 +02:00 committed by Maureen Helm
commit bd67c2375f

View file

@ -350,6 +350,7 @@ static int flash_flexspi_nor_write(const struct device *dev, off_t offset,
flash_flexspi_nor_page_program(dev, offset, src, i);
flash_flexspi_nor_wait_bus_busy(dev);
memc_flexspi_reset(data->controller);
src += i;
offset += i;
len -= i;
}