diff options
author | Benn Pörscke <benn.porscke@stericsson.com> | 2011-12-16 15:04:55 +0100 |
---|---|---|
committer | Benn Pörscke <benn.porscke@stericsson.com> | 2011-12-16 15:04:55 +0100 |
commit | 93f379e6cfadfded0d262192ca69d1abc096d90e (patch) | |
tree | 43f180e31ee26ee94f7d2dd559132c30c6476b4d /drivers/mmc/core/core.c | |
parent | 77955e37bd395f789900b8e180991ad67cabd899 (diff) |
Squashandroid-20111223
Change-Id: I2fcf46d1fc4b0cd4c61e5be3654c43b80db86015
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r-- | drivers/mmc/core/core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 11907e15e5f..214ace6b905 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -471,6 +471,18 @@ void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card) data->timeout_clks = 0; } } + + /* + * Some cards require longer data read timeout than indicated in CSD. + * Address this by setting the read timeout to a "reasonably high" + * value. For the cards tested, 300ms has proven enough. If necessary, + * this value can be increased if other problematic cards require this. + */ + if (mmc_card_long_read_time(card) && data->flags & MMC_DATA_READ) { + data->timeout_ns = 300000000; + data->timeout_clks = 0; + } + /* * Some cards need very high timeouts if driven in SPI mode. * The worst observed timeout was 900ms after writing a |