|
@@ -897,11 +897,10 @@ static int mmc_sdio_pre_suspend(struct mmc_host *host)
|
|
*/
|
|
*/
|
|
static int mmc_sdio_suspend(struct mmc_host *host)
|
|
static int mmc_sdio_suspend(struct mmc_host *host)
|
|
{
|
|
{
|
|
- if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) {
|
|
|
|
- mmc_claim_host(host);
|
|
|
|
|
|
+ mmc_claim_host(host);
|
|
|
|
+
|
|
|
|
+ if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host))
|
|
sdio_disable_wide(host->card);
|
|
sdio_disable_wide(host->card);
|
|
- mmc_release_host(host);
|
|
|
|
- }
|
|
|
|
|
|
|
|
if (!mmc_card_keep_power(host)) {
|
|
if (!mmc_card_keep_power(host)) {
|
|
mmc_power_off(host);
|
|
mmc_power_off(host);
|
|
@@ -910,6 +909,8 @@ static int mmc_sdio_suspend(struct mmc_host *host)
|
|
mmc_retune_needed(host);
|
|
mmc_retune_needed(host);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ mmc_release_host(host);
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1018,15 +1019,24 @@ out:
|
|
static int mmc_sdio_runtime_suspend(struct mmc_host *host)
|
|
static int mmc_sdio_runtime_suspend(struct mmc_host *host)
|
|
{
|
|
{
|
|
/* No references to the card, cut the power to it. */
|
|
/* No references to the card, cut the power to it. */
|
|
|
|
+ mmc_claim_host(host);
|
|
mmc_power_off(host);
|
|
mmc_power_off(host);
|
|
|
|
+ mmc_release_host(host);
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
static int mmc_sdio_runtime_resume(struct mmc_host *host)
|
|
static int mmc_sdio_runtime_resume(struct mmc_host *host)
|
|
{
|
|
{
|
|
|
|
+ int ret;
|
|
|
|
+
|
|
/* Restore power and re-initialize. */
|
|
/* Restore power and re-initialize. */
|
|
|
|
+ mmc_claim_host(host);
|
|
mmc_power_up(host, host->card->ocr);
|
|
mmc_power_up(host, host->card->ocr);
|
|
- return mmc_sdio_power_restore(host);
|
|
|
|
|
|
+ ret = mmc_sdio_power_restore(host);
|
|
|
|
+ mmc_release_host(host);
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
}
|
|
}
|
|
|
|
|
|
static int mmc_sdio_reset(struct mmc_host *host)
|
|
static int mmc_sdio_reset(struct mmc_host *host)
|