diff options
author | Daniel Chen <daniel.ch_chen@htc.com> | 2011-12-13 01:22:03 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-12-26 16:42:05 +0800 |
commit | 4d6fa3206b9ce7bf3c8db1f8762ebf2cb1dfb320 (patch) | |
tree | 97ffd5da8e83d3f82ab4d51b04635f3e5e560a25 /drivers | |
parent | 9ac17b107cd686ffe1ef7c038a90bc1564c4ec45 (diff) |
mmc: sdio: Add high speed support to sdio_reset_comm()
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/core/sdio.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 903dc539b08..d6571790791 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -967,7 +967,28 @@ int sdio_reset_comm(struct mmc_card *card) goto err; } - mmc_set_clock(host, card->cis.max_dtr); + /* + * Switch to high-speed (if supported). + */ + err = sdio_enable_hs(card); + if (err) + goto err; + + /* + * Change to the card's maximum speed. + */ + if (mmc_card_highspeed(card)) { + /* + * The SDIO specification doesn't mention how + * the CIS transfer speed register relates to + * high-speed, but it seems that 50 MHz is + * mandatory. + */ + mmc_set_clock(host, 50000000); + } else { + mmc_set_clock(host, card->cis.max_dtr); + } + err = sdio_enable_wide(card); if (err) goto err; |