aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/core/sdio.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2010-10-06 17:25:02 -0700
committerArve Hjønnevåg <arve@android.com>2013-07-01 13:40:24 -0700
commit91ee26ab8aa31dcacf691b6906b98219a3c26d39 (patch)
treecd8df7c2c607d7de570940af29658776de3eb30d /drivers/mmc/core/sdio.c
parent5f53328759a1034a0bacdf22752c59410871c0f3 (diff)
mmc: sdio: Fix enable_hs and enable_wide in sdio_reset_comm()
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/mmc/core/sdio.c')
-rw-r--r--drivers/mmc/core/sdio.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index a3654b0a744..c1fbd8012ab 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -1275,7 +1275,7 @@ int sdio_reset_comm(struct mmc_card *card)
if (mmc_host_is_spi(host)) {
err = mmc_spi_set_crc(host, use_spi_crc);
if (err)
- goto err;
+ goto err;
}
if (!mmc_host_is_spi(host)) {
@@ -1294,27 +1294,22 @@ int sdio_reset_comm(struct mmc_card *card)
* Switch to high-speed (if supported).
*/
err = sdio_enable_hs(card);
- if (err)
+ if (err > 0)
+ mmc_sd_go_highspeed(card);
+ else 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);
- }
+ mmc_set_clock(host, mmc_sdio_get_max_clock(card));
- err = sdio_enable_wide(card);
- if (err)
+ err = sdio_enable_4bit_bus(card);
+ if (err > 0)
+ mmc_set_bus_width(host, MMC_BUS_WIDTH_4);
+ else if (err)
goto err;
+
mmc_release_host(host);
return 0;
err: