Merge "mmc: Enable clock gating for cmdq"
This commit is contained in:
commit
f6277afe48
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue