]>
Commit | Line | Data |
---|---|---|
79adb0ff GKH |
1 | From 01167c7b9cbf099c69fe411a228e4e9c7104e123 Mon Sep 17 00:00:00 2001 |
2 | From: Stefan Wahren <stefan.wahren@i2se.com> | |
3 | Date: Thu, 5 Jan 2017 19:24:04 +0000 | |
4 | Subject: mmc: mxs-mmc: Fix additional cycles after transmission stop | |
5 | ||
6 | From: Stefan Wahren <stefan.wahren@i2se.com> | |
7 | ||
8 | commit 01167c7b9cbf099c69fe411a228e4e9c7104e123 upstream. | |
9 | ||
10 | According to the code the intention is to append 8 SCK cycles | |
11 | instead of 4 at end of a MMC_STOP_TRANSMISSION command. But this | |
12 | will never happened because it's an AC command not an ADTC command. | |
13 | So fix this by moving the statement into the right function. | |
14 | ||
15 | Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> | |
16 | Fixes: e4243f13d10e (mmc: mxs-mmc: add mmc host driver for i.MX23/28) | |
17 | Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> | |
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
19 | ||
20 | --- | |
21 | drivers/mmc/host/mxs-mmc.c | 6 ++++-- | |
22 | 1 file changed, 4 insertions(+), 2 deletions(-) | |
23 | ||
24 | --- a/drivers/mmc/host/mxs-mmc.c | |
25 | +++ b/drivers/mmc/host/mxs-mmc.c | |
26 | @@ -309,6 +309,9 @@ static void mxs_mmc_ac(struct mxs_mmc_ho | |
27 | cmd0 = BF_SSP(cmd->opcode, CMD0_CMD); | |
28 | cmd1 = cmd->arg; | |
29 | ||
30 | + if (cmd->opcode == MMC_STOP_TRANSMISSION) | |
31 | + cmd0 |= BM_SSP_CMD0_APPEND_8CYC; | |
32 | + | |
33 | if (host->sdio_irq_en) { | |
34 | ctrl0 |= BM_SSP_CTRL0_SDIO_IRQ_CHECK; | |
35 | cmd0 |= BM_SSP_CMD0_CONT_CLKING_EN | BM_SSP_CMD0_SLOW_CLKING_EN; | |
36 | @@ -417,8 +420,7 @@ static void mxs_mmc_adtc(struct mxs_mmc_ | |
37 | ssp->base + HW_SSP_BLOCK_SIZE); | |
38 | } | |
39 | ||
40 | - if ((cmd->opcode == MMC_STOP_TRANSMISSION) || | |
41 | - (cmd->opcode == SD_IO_RW_EXTENDED)) | |
42 | + if (cmd->opcode == SD_IO_RW_EXTENDED) | |
43 | cmd0 |= BM_SSP_CMD0_APPEND_8CYC; | |
44 | ||
45 | cmd1 = cmd->arg; |