diff options
Diffstat (limited to 'drivers/mmc/core/sd.c')
| -rw-r--r-- | drivers/mmc/core/sd.c | 27 | 
1 files changed, 17 insertions, 10 deletions
| diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index d90a6de7901d..ad4d43eae99d 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -660,15 +660,10 @@ static int mmc_sd_init_uhs_card(struct mmc_card *card)  	 * SPI mode doesn't define CMD19 and tuning is only valid for SDR50 and  	 * SDR104 mode SD-cards. Note that tuning is mandatory for SDR104.  	 */ -	if (!mmc_host_is_spi(card->host) && card->host->ops->execute_tuning && -			(card->sd_bus_speed == UHS_SDR50_BUS_SPEED || -			 card->sd_bus_speed == UHS_SDR104_BUS_SPEED)) { -		mmc_host_clk_hold(card->host); -		err = card->host->ops->execute_tuning(card->host, -						      MMC_SEND_TUNING_BLOCK); -		mmc_host_clk_release(card->host); -	} - +	if (!mmc_host_is_spi(card->host) && +	    (card->sd_bus_speed == UHS_SDR50_BUS_SPEED || +	     card->sd_bus_speed == UHS_SDR104_BUS_SPEED)) +		err = mmc_execute_tuning(card);  out:  	kfree(status); @@ -933,6 +928,12 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,  	}  	/* +	 * Call the optional HC's init_card function to handle quirks. +	 */ +	if (host->ops->init_card) +		host->ops->init_card(host, card); + +	/*  	 * For native busses:  get card RCA and quit open drain mode.  	 */  	if (!mmc_host_is_spi(host)) { @@ -1191,6 +1192,12 @@ static int mmc_sd_power_restore(struct mmc_host *host)  	return ret;  } +static int mmc_sd_reset(struct mmc_host *host) +{ +	mmc_power_cycle(host, host->card->ocr); +	return mmc_sd_power_restore(host); +} +  static const struct mmc_bus_ops mmc_sd_ops = {  	.remove = mmc_sd_remove,  	.detect = mmc_sd_detect, @@ -1201,6 +1208,7 @@ static const struct mmc_bus_ops mmc_sd_ops = {  	.power_restore = mmc_sd_power_restore,  	.alive = mmc_sd_alive,  	.shutdown = mmc_sd_suspend, +	.reset = mmc_sd_reset,  };  /* @@ -1271,4 +1279,3 @@ err:  	return err;  } - |