Commit 3e207c8c authored by Adrian Hunter's avatar Adrian Hunter Committed by Ulf Hansson

mmc: core: Turn off CQE before sending commands

CQE needs to be off for the host controller to accept non-CQ commands. Turn
off the CQE before sending commands, and ensure it is off in any reset or
power management paths, or re-tuning.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent d3bf68ae
...@@ -260,6 +260,9 @@ static void __mmc_start_request(struct mmc_host *host, struct mmc_request *mrq) ...@@ -260,6 +260,9 @@ static void __mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
trace_mmc_request_start(host, mrq); trace_mmc_request_start(host, mrq);
if (host->cqe_on)
host->cqe_ops->cqe_off(host);
host->ops->request(host, mrq); host->ops->request(host, mrq);
} }
...@@ -979,6 +982,9 @@ int mmc_execute_tuning(struct mmc_card *card) ...@@ -979,6 +982,9 @@ int mmc_execute_tuning(struct mmc_card *card)
if (!host->ops->execute_tuning) if (!host->ops->execute_tuning)
return 0; return 0;
if (host->cqe_on)
host->cqe_ops->cqe_off(host);
if (mmc_card_mmc(card)) if (mmc_card_mmc(card))
opcode = MMC_SEND_TUNING_BLOCK_HS200; opcode = MMC_SEND_TUNING_BLOCK_HS200;
else else
...@@ -1018,6 +1024,9 @@ void mmc_set_bus_width(struct mmc_host *host, unsigned int width) ...@@ -1018,6 +1024,9 @@ void mmc_set_bus_width(struct mmc_host *host, unsigned int width)
*/ */
void mmc_set_initial_state(struct mmc_host *host) void mmc_set_initial_state(struct mmc_host *host)
{ {
if (host->cqe_on)
host->cqe_ops->cqe_off(host);
mmc_retune_disable(host); mmc_retune_disable(host);
if (mmc_host_is_spi(host)) if (mmc_host_is_spi(host))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment