From: Daniel Chen Date: Wed, 9 Dec 2009 17:45:36 +0000 (-0800) Subject: mmc: sdio: Add high speed support to sdio_reset_comm() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8d2effe1cf5f782ded297d1a32a96423fe069748;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git mmc: sdio: Add high speed support to sdio_reset_comm() Signed-off-by: San Mehat --- diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index a4e3733f61e0..dbee1606b2fb 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -1263,7 +1263,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;