From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Date: Sat, 11 Jun 2011 16:46:47 -0500 Subject: [U-Boot] [PATCH 3/8] mmc: sdhci: exit cmd on error status In-Reply-To: <1307828812-14825-1-git-send-email-robherring2@gmail.com> References: <1307828812-14825-1-git-send-email-robherring2@gmail.com> Message-ID: <1307828812-14825-4-git-send-email-robherring2@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Rob Herring If the controller has an error condition, then stop polling for command complete and exit mmc_send_cmd. Signed-off-by: Rob Herring --- drivers/mmc/sdhci.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index c82bde0..0a5b30d 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -206,6 +206,10 @@ static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, writel(mask, &host->reg->norintsts); break; } + if (mask & (1 << 15)) { + writel(mask, &host->reg->norintsts); + return -1; + } } if (i == retry) { -- 1.7.4.1