summaryrefslogtreecommitdiff
path: root/drivers/mmc/tegra2_mmc.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2012-02-17 23:54:46 +0100
committerWolfgang Denk <wd@denx.de>2012-02-17 23:54:46 +0100
commit2acca35ce4604dcef933f07d90aa9c9c930e1049 (patch)
treec97ed42561e365e04d62b38425f65c662ab267d4 /drivers/mmc/tegra2_mmc.c
parent7dda0c3759c6ee190d44b8ceaeab58047cb9a957 (diff)
parentd617c426a6ef8d731da1936bca7649a1574d5420 (diff)
downloadolio-uboot-2014.01-2acca35ce4604dcef933f07d90aa9c9c930e1049.tar.xz
olio-uboot-2014.01-2acca35ce4604dcef933f07d90aa9c9c930e1049.zip
Merge branch 'master' of git://git.denx.de/u-boot-mmc
* 'master' of git://git.denx.de/u-boot-mmc: mmc: make mmc_send_status() more reliable mmc: fix card busy polling Tegra: mmc: Fixed handling of interrupts in timeouts. omap_hsmmc: Wait for CMDI to be clear
Diffstat (limited to 'drivers/mmc/tegra2_mmc.c')
-rw-r--r--drivers/mmc/tegra2_mmc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/tegra2_mmc.c b/drivers/mmc/tegra2_mmc.c
index 3191557c5..33cc8fb80 100644
--- a/drivers/mmc/tegra2_mmc.c
+++ b/drivers/mmc/tegra2_mmc.c
@@ -227,16 +227,19 @@ static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
if (i == retry) {
printf("%s: waiting for status update\n", __func__);
+ writel(mask, &host->reg->norintsts);
return TIMEOUT;
}
if (mask & TEGRA_MMC_NORINTSTS_CMD_TIMEOUT) {
/* Timeout Error */
debug("timeout: %08x cmd %d\n", mask, cmd->cmdidx);
+ writel(mask, &host->reg->norintsts);
return TIMEOUT;
} else if (mask & TEGRA_MMC_NORINTSTS_ERR_INTERRUPT) {
/* Error Interrupt */
debug("error: %08x cmd %d\n", mask, cmd->cmdidx);
+ writel(mask, &host->reg->norintsts);
return -1;
}
@@ -265,6 +268,7 @@ static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
if (i == retry) {
printf("%s: card is still busy\n", __func__);
+ writel(mask, &host->reg->norintsts);
return TIMEOUT;
}