drivers/spi/spi_flash: honor spi controller fifo size for reads
The spi_flash_cmd_read_fast() and spi_flash_cmd_read_slow() were just
passing full size buffers to the spi controller ops. However, the
code wasn't honoring what the spi controller can actually perform.
This would cause failures to read on controllers when large requests
were sent in. Fix this by introducing a
spi_flash_cmd_read_array_wrapped() function that calls
spi_flash_cmd_read_array() in a loop once the maximum transfer size is
calculated based on the spi controller's settings.
Signed-off-by: Aaron Durbin <email@example.com>
Tested-by: build bot (Jenkins) <firstname.lastname@example.org>
Reviewed-by: Furquan Shaikh <email@example.com>
Reviewed-by: Justin TerAvest <firstname.lastname@example.org>
1 file changed