]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
spi: core: Increase timeout value
authorHarini Katakam <harinik@xilinx.com>
Fri, 11 Apr 2014 06:36:28 +0000 (12:06 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 29 Aug 2014 11:18:21 +0000 (13:18 +0200)
commitbd31d3d2d3cdaee82691e5dff8039ec08fb7b665
treed3e2a4f90ec12ed2090f489f27869349bcedebe3
parent68213a152595e9184c30ae5c1713a061f095154e
spi: core: Increase timeout value

The existing timeout value in wait_for_completion_timeout is
calculated from the transfer length and speed with tolerance of 10msec.
This is too low because this is used for error conditions such as
hardware hang etc.
The xfer->speed_hz considered may not be the actual speed set
because the best clock divisor is chosen from a limited set such that
the actual speed <= requested speed. This will lead to timeout being
less than actual transfer time.
Considering acceptable latencies, this timeout can be set to a
value double the expected transfer plus 100 msecs.
This patch adds the same in the core.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi.c