Skip to content

Commit

Permalink
spi/spi_s3c64xx: Increase dead reckoning time in wait_for_xfer()
Browse files Browse the repository at this point in the history
For small transfers at high speeds the expected transfer time can easily
be well under 1ms, causing the delay in wait_for_xfer() to be only the
dead reckoning fudge factor of 5ms currently included. Experiments on
some of my systems shows that this is marginal for some transfers so
double it to 10ms.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Mark Brown authored and Grant Likely committed Sep 8, 2010
1 parent d2a787f commit 9d8f86b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi_s3c64xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static int wait_for_xfer(struct s3c64xx_spi_driver_data *sdd,

/* millisecs to xfer 'len' bytes @ 'cur_speed' */
ms = xfer->len * 8 * 1000 / sdd->cur_speed;
ms += 5; /* some tolerance */
ms += 10; /* some tolerance */

if (dma_mode) {
val = msecs_to_jiffies(ms) + 10;
Expand Down

0 comments on commit 9d8f86b

Please sign in to comment.