diff options
author | Daniel Chen <daniel.ch_chen@htc.com> | 2009-12-09 09:45:36 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:37:59 -0800 |
commit | 7730ad67f239a991b5a8a4c957b73a084664e890 (patch) | |
tree | 6a7cc6777c402b632a24947d47ad8113ebcc45fd /drivers/mmc/core | |
parent | 8d717e961dfb0f8b91bd65bb0b9e9ebe50d6da7b (diff) |
mmc: sdio: Add high speed support to sdio_reset_comm()
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'drivers/mmc/core')
-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 f7aebb3b6a9e..f2edfb13e198 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -969,7 +969,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; |