mmc: core: Add clock hold and release pair for cmdq_ops
mmc_host_clk_hold/release pair should be added for relevant cmdq_ops. Since it enables host->clock which is needed for register access as well (apart from MCLK). Change-Id: I6d9d15a421225c5b4179cb19e467a17d01ad176f Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
This commit is contained in:
parent
171178056b
commit
8509fa81d0
|
@ -63,7 +63,9 @@ static int mmc_host_runtime_suspend(struct device *dev)
|
|||
pr_err("%s: halt: failed: %d\n", __func__, ret);
|
||||
return ret;
|
||||
}
|
||||
mmc_host_clk_hold(host);
|
||||
host->cmdq_ops->disable(host, true);
|
||||
mmc_host_clk_release(host);
|
||||
}
|
||||
|
||||
ret = mmc_suspend_host(host);
|
||||
|
@ -152,7 +154,9 @@ static int mmc_host_suspend(struct device *dev)
|
|||
pr_err("%s: halt: failed: %d\n", __func__, ret);
|
||||
return ret;
|
||||
}
|
||||
mmc_host_clk_hold(host);
|
||||
host->cmdq_ops->disable(host, true);
|
||||
mmc_host_clk_release(host);
|
||||
}
|
||||
ret = mmc_suspend_host(host);
|
||||
if (ret < 0)
|
||||
|
|
|
@ -1351,6 +1351,7 @@ static int mmc_select_cmdq(struct mmc_card *card)
|
|||
goto out;
|
||||
|
||||
mmc_card_set_cmdq(card);
|
||||
mmc_host_clk_hold(card->host);
|
||||
ret = host->cmdq_ops->enable(card->host);
|
||||
if (ret) {
|
||||
pr_err("%s: failed (%d) enabling CMDQ on host\n",
|
||||
|
@ -1358,10 +1359,12 @@ static int mmc_select_cmdq(struct mmc_card *card)
|
|||
mmc_card_clr_cmdq(card);
|
||||
ret = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_CMDQ, 0,
|
||||
card->ext_csd.generic_cmd6_time);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
mmc_host_clk_release(card->host);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
mmc_host_clk_release(card->host);
|
||||
pr_info("%s: CMDQ enabled on card\n", mmc_hostname(host));
|
||||
out:
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue