diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-02-17 05:51:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-12 13:32:55 -0400 |
commit | d5d292475ce5ed9d9cbc3630e0a5fbed8155bb3a (patch) | |
tree | 4ac95c764147104d7bd2400aaebc2c689a6d5fb0 | |
parent | f148e8a6cf51419b4dc7c99941054ed3ddad5a87 (diff) |
mmc: sdhci-esdhc-imx: fix for mmc cards on i.MX5
commit 5b6b0ad6e572b32a641116aaa5f897ffebe31e44 upstream.
On i.MX53 we have to write a special SDHCI_CMD_ABORTCMD to the
SDHCI_TRANSFER_MODE register during a MMC_STOP_TRANSMISSION
command. This works for SD cards. However, with MMC cards
the MMC_SET_BLOCK_COUNT command is used instead, but this
needs the same handling. Fix MMC cards by testing for the
MMC_SET_BLOCK_COUNT command aswell. Tested on a custom i.MX53
board with a Transcend MMC+ card and eMMC.
The kernel started used MMC_SET_BLOCK_COUNT in 3.0, so this
is a regression for these boards introduced in 3.0; it should
go to 3.0/3.1/3.2-stable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index ba31abee948..92e54370183 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c | |||
@@ -139,8 +139,9 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg) | |||
139 | imx_data->scratchpad = val; | 139 | imx_data->scratchpad = val; |
140 | return; | 140 | return; |
141 | case SDHCI_COMMAND: | 141 | case SDHCI_COMMAND: |
142 | if ((host->cmd->opcode == MMC_STOP_TRANSMISSION) | 142 | if ((host->cmd->opcode == MMC_STOP_TRANSMISSION || |
143 | && (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT)) | 143 | host->cmd->opcode == MMC_SET_BLOCK_COUNT) && |
144 | (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT)) | ||
144 | val |= SDHCI_CMD_ABORTCMD; | 145 | val |= SDHCI_CMD_ABORTCMD; |
145 | writel(val << 16 | imx_data->scratchpad, | 146 | writel(val << 16 | imx_data->scratchpad, |
146 | host->ioaddr + SDHCI_TRANSFER_MODE); | 147 | host->ioaddr + SDHCI_TRANSFER_MODE); |