diff options
Diffstat (limited to 'drivers/mmc/core/sdio.c')
| -rw-r--r-- | drivers/mmc/core/sdio.c | 53 | 
1 files changed, 6 insertions, 47 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 4d721c6e2af0..e636d9e99e4a 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -363,7 +363,7 @@ static unsigned mmc_sdio_get_max_clock(struct mmc_card *card)  {  	unsigned max_dtr; -	if (mmc_card_highspeed(card)) { +	if (mmc_card_hs(card)) {  		/*  		 * The SDIO specification doesn't mention how  		 * the CIS transfer speed register relates to @@ -733,7 +733,6 @@ try_again:  		mmc_set_clock(host, card->cis.max_dtr);  		if (card->cccr.high_speed) { -			mmc_card_set_highspeed(card);  			mmc_set_timing(card->host, MMC_TIMING_SD_HS);  		} @@ -792,16 +791,13 @@ try_again:  		err = mmc_sdio_init_uhs_card(card);  		if (err)  			goto remove; - -		/* Card is an ultra-high-speed card */ -		mmc_card_set_uhs(card);  	} else {  		/*  		 * Switch to high-speed (if supported).  		 */  		err = sdio_enable_hs(card);  		if (err > 0) -			mmc_sd_go_highspeed(card); +			mmc_set_timing(card->host, MMC_TIMING_SD_HS);  		else if (err)  			goto remove; @@ -943,40 +939,21 @@ static int mmc_sdio_pre_suspend(struct mmc_host *host)   */  static int mmc_sdio_suspend(struct mmc_host *host)  { -	int i, err = 0; - -	for (i = 0; i < host->card->sdio_funcs; i++) { -		struct sdio_func *func = host->card->sdio_func[i]; -		if (func && sdio_func_present(func) && func->dev.driver) { -			const struct dev_pm_ops *pmops = func->dev.driver->pm; -			err = pmops->suspend(&func->dev); -			if (err) -				break; -		} -	} -	while (err && --i >= 0) { -		struct sdio_func *func = host->card->sdio_func[i]; -		if (func && sdio_func_present(func) && func->dev.driver) { -			const struct dev_pm_ops *pmops = func->dev.driver->pm; -			pmops->resume(&func->dev); -		} -	} - -	if (!err && mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) { +	if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) {  		mmc_claim_host(host);  		sdio_disable_wide(host->card);  		mmc_release_host(host);  	} -	if (!err && !mmc_card_keep_power(host)) +	if (!mmc_card_keep_power(host))  		mmc_power_off(host); -	return err; +	return 0;  }  static int mmc_sdio_resume(struct mmc_host *host)  { -	int i, err = 0; +	int err = 0;  	BUG_ON(!host);  	BUG_ON(!host->card); @@ -1019,24 +996,6 @@ static int mmc_sdio_resume(struct mmc_host *host)  		wake_up_process(host->sdio_irq_thread);  	mmc_release_host(host); -	/* -	 * If the card looked to be the same as before suspending, then -	 * we proceed to resume all card functions.  If one of them returns -	 * an error then we simply return that error to the core and the -	 * card will be redetected as new.  It is the responsibility of -	 * the function driver to perform further tests with the extra -	 * knowledge it has of the card to confirm the card is indeed the -	 * same as before suspending (same MAC address for network cards, -	 * etc.) and return an error otherwise. -	 */ -	for (i = 0; !err && i < host->card->sdio_funcs; i++) { -		struct sdio_func *func = host->card->sdio_func[i]; -		if (func && sdio_func_present(func) && func->dev.driver) { -			const struct dev_pm_ops *pmops = func->dev.driver->pm; -			err = pmops->resume(&func->dev); -		} -	} -  	host->pm_flags &= ~MMC_PM_KEEP_POWER;  	return err;  }  |