mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
Merge "mmc: core: Fix mmc sleep/awake functionality"
This commit is contained in:
commit
4028cd304e
2 changed files with 2 additions and 14 deletions
|
|
@ -2094,17 +2094,6 @@ static int mmc_can_sleep(struct mmc_card *card)
|
|||
return (card && card->ext_csd.rev >= 3);
|
||||
}
|
||||
|
||||
static int mmc_can_sleepawake(struct mmc_host *host)
|
||||
{
|
||||
#if defined(CONFIG_SDC_QTI)
|
||||
return host && (host->caps2 & MMC_CAP2_SLEEP_AWAKE) && host->card &&
|
||||
(host->card->ext_csd.rev >= 3);
|
||||
#else
|
||||
return host && host->card && (host->card->ext_csd.rev >= 3);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static int mmc_sleepawake(struct mmc_host *host, bool sleep)
|
||||
{
|
||||
struct mmc_command cmd = {};
|
||||
|
|
@ -2329,7 +2318,7 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend)
|
|||
if (mmc_can_poweroff_notify(host->card) &&
|
||||
((host->caps2 & MMC_CAP2_FULL_PWR_CYCLE) || !is_suspend))
|
||||
err = mmc_poweroff_notify(host->card, notify_type);
|
||||
if (mmc_can_sleepawake(host)) {
|
||||
if (mmc_can_sleep(host->card)) {
|
||||
#if defined(CONFIG_SDC_QTI)
|
||||
memcpy(&host->cached_ios, &host->ios, sizeof(host->cached_ios));
|
||||
#endif
|
||||
|
|
@ -2441,7 +2430,7 @@ static int _mmc_resume(struct mmc_host *host)
|
|||
mmc_log_string(host, "Enter\n");
|
||||
mmc_power_up(host, host->card->ocr);
|
||||
|
||||
if (mmc_can_sleepawake(host)) {
|
||||
if (mmc_can_sleep(host->card)) {
|
||||
err = mmc_sleepawake(host, false);
|
||||
if (!err)
|
||||
err = mmc_partial_init(host);
|
||||
|
|
|
|||
|
|
@ -479,7 +479,6 @@ struct mmc_host {
|
|||
#define MMC_CAP2_CRYPTO (1 << 27) /* Host supports inline encryption */
|
||||
#if defined(CONFIG_SDC_QTI)
|
||||
#define MMC_CAP2_CLK_SCALE (1 << 28) /* Allow dynamic clk scaling */
|
||||
#define MMC_CAP2_SLEEP_AWAKE (1 << 29) /* Use Sleep/Awake (CMD5) */
|
||||
#endif
|
||||
|
||||
int fixed_drv_type; /* fixed driver type for non-removable media */
|
||||
|
|
|
|||
Loading…
Reference in a new issue