diff options
| author | Ritesh Harjani <riteshh@codeaurora.org> | 2016-04-06 13:40:01 +0530 |
|---|---|---|
| committer | Kyle Yan <kyan@codeaurora.org> | 2016-06-13 19:06:19 -0700 |
| commit | 240bee3ffdb7f00da3e2b626e3521869581fc52d (patch) | |
| tree | e91dfd43507f938e30a2e138b6fe4e1c583e26dc | |
| parent | 3c7b269a36603dfe569cb1e84c1753916c4c8fdc (diff) | |
mmc: mmc: Add clk_hold/release pair before caching host->ios
We need to add mmc_host_clk_hold/release pair before caching
host->ios. Since it may so happen that the clks are gated
while caching and thus in next CMD5 awake, changing clk back to
cached_ios->clk might give NOC error.
Change-Id: I32b8c1bbbd67b4daadaa85c3c01beab8ff1b7cb2
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
| -rw-r--r-- | drivers/mmc/core/mmc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 7388416ba74d..00617646e708 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -2520,9 +2520,16 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend) goto out; if (mmc_can_sleepawake(host)) { + /* + * For caching host->ios to cached_ios we need to + * make sure that clocks are not gated otherwise + * cached_ios->clock will be 0. + */ + mmc_host_clk_hold(host); memcpy(&host->cached_ios, &host->ios, sizeof(host->cached_ios)); mmc_cache_card_ext_csd(host); err = mmc_sleepawake(host, true); + mmc_host_clk_release(host); } else if (!mmc_host_is_spi(host)) { err = mmc_deselect_cards(host); } |
