diff options
author | Stefan Wahren <stefan.wahren@i2se.com> | 2017-01-05 14:24:04 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-26 02:24:38 -0500 |
commit | ad17175732ca7b368b654c5736ef488a064c52a4 (patch) | |
tree | b7a89576bcc34896f82788409524bd31d80bc5e2 | |
parent | c1274eeb2fe3524ed075d3343213923262c845c8 (diff) |
mmc: mxs-mmc: Fix additional cycles after transmission stop
commit 01167c7b9cbf099c69fe411a228e4e9c7104e123 upstream.
According to the code the intention is to append 8 SCK cycles
instead of 4 at end of a MMC_STOP_TRANSMISSION command. But this
will never happened because it's an AC command not an ADTC command.
So fix this by moving the statement into the right function.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Fixes: e4243f13d10e (mmc: mxs-mmc: add mmc host driver for i.MX23/28)
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/mmc/host/mxs-mmc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 44ecebd1ea8c..c8b8ac66ff7e 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c | |||
@@ -309,6 +309,9 @@ static void mxs_mmc_ac(struct mxs_mmc_host *host) | |||
309 | cmd0 = BF_SSP(cmd->opcode, CMD0_CMD); | 309 | cmd0 = BF_SSP(cmd->opcode, CMD0_CMD); |
310 | cmd1 = cmd->arg; | 310 | cmd1 = cmd->arg; |
311 | 311 | ||
312 | if (cmd->opcode == MMC_STOP_TRANSMISSION) | ||
313 | cmd0 |= BM_SSP_CMD0_APPEND_8CYC; | ||
314 | |||
312 | if (host->sdio_irq_en) { | 315 | if (host->sdio_irq_en) { |
313 | ctrl0 |= BM_SSP_CTRL0_SDIO_IRQ_CHECK; | 316 | ctrl0 |= BM_SSP_CTRL0_SDIO_IRQ_CHECK; |
314 | cmd0 |= BM_SSP_CMD0_CONT_CLKING_EN | BM_SSP_CMD0_SLOW_CLKING_EN; | 317 | cmd0 |= BM_SSP_CMD0_CONT_CLKING_EN | BM_SSP_CMD0_SLOW_CLKING_EN; |
@@ -417,8 +420,7 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host) | |||
417 | ssp->base + HW_SSP_BLOCK_SIZE); | 420 | ssp->base + HW_SSP_BLOCK_SIZE); |
418 | } | 421 | } |
419 | 422 | ||
420 | if ((cmd->opcode == MMC_STOP_TRANSMISSION) || | 423 | if (cmd->opcode == SD_IO_RW_EXTENDED) |
421 | (cmd->opcode == SD_IO_RW_EXTENDED)) | ||
422 | cmd0 |= BM_SSP_CMD0_APPEND_8CYC; | 424 | cmd0 |= BM_SSP_CMD0_APPEND_8CYC; |
423 | 425 | ||
424 | cmd1 = cmd->arg; | 426 | cmd1 = cmd->arg; |