]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.4.45/mmc-mxs-mmc-fix-additional-cycles-after-transmission-stop.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.4.45 / mmc-mxs-mmc-fix-additional-cycles-after-transmission-stop.patch
CommitLineData
79adb0ff
GKH
1From 01167c7b9cbf099c69fe411a228e4e9c7104e123 Mon Sep 17 00:00:00 2001
2From: Stefan Wahren <stefan.wahren@i2se.com>
3Date: Thu, 5 Jan 2017 19:24:04 +0000
4Subject: mmc: mxs-mmc: Fix additional cycles after transmission stop
5
6From: Stefan Wahren <stefan.wahren@i2se.com>
7
8commit 01167c7b9cbf099c69fe411a228e4e9c7104e123 upstream.
9
10According to the code the intention is to append 8 SCK cycles
11instead of 4 at end of a MMC_STOP_TRANSMISSION command. But this
12will never happened because it's an AC command not an ADTC command.
13So fix this by moving the statement into the right function.
14
15Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
16Fixes: e4243f13d10e (mmc: mxs-mmc: add mmc host driver for i.MX23/28)
17Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
18Signed-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;