Patchwork [U-Boot] Powerpc: eSDHC: Fix mmc read write err in uboot of T4240QDS board

login
register
mail settings
Submitter Haijun.Zhang
Date July 1, 2013, 6:26 a.m.
Message ID <1372659961-6906-1-git-send-email-Haijun.Zhang@freescale.com>
Download mbox | patch
Permalink /patch/256019/
State Accepted, archived
Delegated to: Andy Fleming
Headers show

Comments

Haijun.Zhang - July 1, 2013, 6:26 a.m.
Fill the right command type when using CMD12 to stop data transfer.

Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
CC: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
CC: Scott Wood <scottwood@freescale.com>
---
 drivers/mmc/fsl_esdhc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Andy Fleming - July 17, 2013, 12:10 a.m.
On Mon, Jul 01, 2013 at 02:26:01PM +0800, Haijun.Zhang wrote:
> Fill the right command type when using CMD12 to stop data transfer.
> 
> Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
> CC: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
> CC: Scott Wood <scottwood@freescale.com>

Applied to get the fix, though I don't like this sort of #ifdef.

Patch

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index e93e38a..09bb1be 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -100,7 +100,7 @@  static 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 defined(CONFIG_MX53) || defined(CONFIG_T4240QDS)
 	if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
 		xfertyp |= XFERTYP_CMDTYP_ABORT;
 #endif