Merge "mmc: Enable clock gating for cmdq"

This commit is contained in:
Linux Build Service Account 2015-06-03 18:27:48 -07:00 committed by Gerrit - the friendly Code Review server
commit f6277afe48
2 changed files with 6 additions and 1 deletions

View File

@ -2984,7 +2984,9 @@ static void mmc_blk_cmdq_reset(struct mmc_host *host, bool clear_all)
mmc_cmdq_discard_queue(host, 0);
reset:
mmc_hw_reset(host);
mmc_host_clk_hold(host);
host->cmdq_ops->reset(host, true);
mmc_host_clk_release(host);
clear_bit(CMDQ_STATE_HALT, &host->cmdq_ctx.curr_state);
}
@ -3190,6 +3192,7 @@ void mmc_blk_cmdq_req_done(struct mmc_request *mrq)
{
struct request *req = mrq->req;
mmc_host_clk_release(mrq->host);
blk_complete_request(req);
}
EXPORT_SYMBOL(mmc_blk_cmdq_req_done);

View File

@ -978,7 +978,6 @@ void mmc_cmdq_post_req(struct mmc_host *host, struct mmc_request *mrq, int err)
{
if (likely(host->cmdq_ops->post_req))
host->cmdq_ops->post_req(host, mrq, err);
mmc_host_clk_release(host);
}
EXPORT_SYMBOL(mmc_cmdq_post_req);
@ -1001,6 +1000,7 @@ int mmc_cmdq_halt(struct mmc_host *host, bool halt)
(!halt && !mmc_host_halt(host)))
return -EINVAL;
mmc_host_clk_hold(host);
if (host->cmdq_ops->halt) {
err = host->cmdq_ops->halt(host, halt);
if (!err && halt)
@ -1010,6 +1010,7 @@ int mmc_cmdq_halt(struct mmc_host *host, bool halt)
} else {
err = -ENOSYS;
}
mmc_host_clk_release(host);
return err;
}
@ -1031,6 +1032,7 @@ EXPORT_SYMBOL(mmc_cmdq_start_req);
static void mmc_cmdq_dcmd_req_done(struct mmc_request *mrq)
{
mmc_host_clk_release(mrq->host);
complete(&mrq->completion);
}