From patchwork Tue Mar 22 11:32:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Hui X-Patchwork-Id: 723 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:45:11 -0000 Delivered-To: patches@linaro.org Received: by 10.204.113.5 with SMTP id y5cs100781bkp; Tue, 22 Mar 2011 04:32:50 -0700 (PDT) Received: by 10.42.155.4 with SMTP id s4mr8669255icw.343.1300793569145; Tue, 22 Mar 2011 04:32:49 -0700 (PDT) Received: from mail-iw0-f178.google.com (mail-iw0-f178.google.com [209.85.214.178]) by mx.google.com with ESMTPS id i1si17191795ibr.30.2011.03.22.04.32.48 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 Mar 2011 04:32:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.214.178 is neither permitted nor denied by best guess record for domain of jason.hui@linaro.org) client-ip=209.85.214.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.214.178 is neither permitted nor denied by best guess record for domain of jason.hui@linaro.org) smtp.mail=jason.hui@linaro.org Received: by iwn9 with SMTP id 9so9219636iwn.37 for ; Tue, 22 Mar 2011 04:32:48 -0700 (PDT) Received: by 10.231.184.5 with SMTP id ci5mr5380692ibb.90.1300793568246; Tue, 22 Mar 2011 04:32:48 -0700 (PDT) Received: from localhost.localdomain ([116.231.118.83]) by mx.google.com with ESMTPS id g17sm2080117ibb.6.2011.03.22.04.32.41 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 Mar 2011 04:32:46 -0700 (PDT) From: Jason Liu To: u-boot@lists.denx.de Cc: galak@kernel.crashing.org, sbabic@denx.de, patches@linaro.org Subject: [U-Boot][PATCH 1/1] fsl_esdhc: Fix multi-block read restriction on i.MX53 eSDHCv2 Date: Tue, 22 Mar 2011 19:32:31 +0800 Message-Id: <1300793551-12645-1-git-send-email-jason.hui@linaro.org> X-Mailer: git-send-email 1.7.0.4 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 --- drivers/mmc/fsl_esdhc.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index f3cccbe..5c3618b 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; }