Permalink
Browse files

omap: mmc: Adjust dto to eliminate timeout errors

A number of SD card types were experiencing timeout errors.  This
could also lead to data corruption in some cases.

This fix proposed by Sukumar Ghoral of TI.
  • Loading branch information...
1 parent 4a99092 commit 5acb24957a7e8e714abbda720fac630438ed5baf @sakoman sakoman committed Jan 12, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 drivers/mmc/host/omap_hsmmc.c
@@ -1405,6 +1405,7 @@ static void set_data_timeout(struct omap_hsmmc_host *host,
cycle_ns = 1000000000 / (clk_get_rate(host->fclk) / clkd);
timeout = timeout_ns / cycle_ns;
timeout += timeout_clks;
+ timeout *= 2;
if (timeout) {
while ((timeout & 0x80000000) == 0) {
dto += 1;

0 comments on commit 5acb249

Please sign in to comment.