Restrict max read length to 16MiB for a single
read command. The max read length would be 32MiB
incase of dual parallel.
This is workaround for read failures if read length
is greater than 16MiB in single and 32MiB in dual
parallel connection.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
else
read_len = remain_len;
} else {
- read_len = len;
+ if (len > (SPI_FLASH_16MB_BOUN << flash->shift))
+ read_len = SPI_FLASH_16MB_BOUN << flash->shift;
+ else
+ read_len = len;
}
if (flash->spi->bytemode == SPI_4BYTE_MODE)