Skip to content

Commit

Permalink
mmc: fix sdio timeout calculation
Browse files Browse the repository at this point in the history
SDIO doesn't have a CSD so it uses different timeout values than
SD memory.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
  • Loading branch information
Pierre Ossman committed Sep 23, 2007
1 parent ce252ed commit e6f918b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/mmc/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,15 @@ void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card)
{
unsigned int mult;

/*
* SDIO cards only define an upper 1 s limit on access.
*/
if (mmc_card_sdio(card)) {
data->timeout_ns = 1000000000;
data->timeout_clks = 0;
return;
}

/*
* SD cards use a 100 multiplier rather than 10
*/
Expand Down

0 comments on commit e6f918b

Please sign in to comment.