aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Liu <jason.hui@linaro.org>2011-03-22 19:32:31 +0800
committerJohn Rigby <john.rigby@linaro.org>2011-04-02 10:50:00 -0600
commit63e0bbdb184407733fa49ebd66c4d5b8ae6e1603 (patch)
tree5356a661cbc40eaf4603d1f3017df82ac8e605cd
parentfdd2af041a094f41d6e27efd9f243c97c9e57a58 (diff)
fsl_esdhc: Fix multi-block read restriction on i.MX53 eSDHCv22011.04.1
For freescale i.MX53 eSDHCv2, when using CMD12, cmdtype need to be set to ABORT, otherwise, next read command will hang. This is a software Software Restrictions in i.MX53 reference manual: 29.7.8 Multi-block Read For pre-defined multi-block read operation, that is,the number of blocks to read has been defined by previous CMD23 for MMC, or pre-defined number of blocks in CMD53 for SDIO/SDCombo,or whatever multi-block read without abort command at card side, an abort command, either automatic or manual CMD12/CMD52, is still required by ESDHC after the pre-defined number of blocks are done, to drive the internal state machine to idle mode. In this case, the card may not respond to this extra abort command and ESDHC will get Response Timeout. It is recommended to manually send an abort command with RSPTYP[1:0] both bits cleared. Signed-off-by: Jason Liu <jason.hui@linaro.org>
-rw-r--r--drivers/mmc/fsl_esdhc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 0962ac447..cb044c8ac 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -99,6 +99,10 @@ uint esdhc_xfertyp(struct mmc_cmd *cmd, struct mmc_data *data)
else if (cmd->resp_type & MMC_RSP_PRESENT)
xfertyp |= XFERTYP_RSPTYP_48;
+#ifdef CONFIG_MX53
+ if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
+ xfertyp |= XFERTYP_CMDTYP_ABORT;
+#endif
return XFERTYP_CMD(cmd->cmdidx) | xfertyp;
}