SPI subsystem default time out tolerance for a transfer to be complete
is 100ms. This works well on ZynqMP and Zynq platforms because on these
hardwares QSPI and SPI runs at 100MHz. But on versal emulation platform,
QSPI and SPI runs at 25MHz and core runs at 2.16MHz.
so the wait time should be increased to accommodate that clock, when
using DMA or IO. Otherwise we will get transfer time outs. Hence
increase the transfer time out tolerance.
Based on various testings this tolerance is increased from 200 to 1000.
Signed-off-by: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
ret = 0;
ms = 8LL * 1000LL * xfer->len;
do_div(ms, xfer->speed_hz);
- ms += ms + 200; /* some tolerance */
+ ms += ms + 1000; /* some tolerance */
if (ms > UINT_MAX)
ms = UINT_MAX;