Skip to content

Commit

Permalink
mmc: sdhci: Use mmc_abort_tuning()
Browse files Browse the repository at this point in the history
Use mmc_abort_tuning() instead of open-coding the stop command.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Adrian Hunter authored and Ulf Hansson committed Dec 5, 2016
1 parent e711f03 commit d0c3ab5
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2098,20 +2098,11 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
sdhci_do_reset(host, SDHCI_RESET_CMD);
sdhci_do_reset(host, SDHCI_RESET_DATA);

if (cmd.opcode != MMC_SEND_TUNING_BLOCK_HS200)
goto out;

sdhci_writel(host, host->ier, SDHCI_INT_ENABLE);
sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE);

spin_unlock_irqrestore(&host->lock, flags);

memset(&cmd, 0, sizeof(cmd));
cmd.opcode = MMC_STOP_TRANSMISSION;
cmd.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
cmd.busy_timeout = 50;
mmc_wait_for_cmd(mmc, &cmd, 0);

mmc_abort_tuning(mmc, opcode);
spin_lock_irqsave(&host->lock, flags);

goto out;
Expand Down

0 comments on commit d0c3ab5

Please sign in to comment.