summaryrefslogtreecommitdiff
path: root/drivers/mmc/fsl_esdhc.c
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-04-14 11:45:06 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-04-14 11:45:06 +0200
commit345be0b26734c560e8b33531ab21a1272179c5c3 (patch)
tree37e5bfbf208bde4d41c20537a953e17ae0b078a2 /drivers/mmc/fsl_esdhc.c
parent8dc16cf9dd6196d99969d12741df186a61a2f9a3 (diff)
parent9b74dc56fba2b9db39420f81c990284f36d5801f (diff)
downloadu-boot-imx-345be0b26734c560e8b33531ab21a1272179c5c3.zip
u-boot-imx-345be0b26734c560e8b33531ab21a1272179c5c3.tar.gz
u-boot-imx-345be0b26734c560e8b33531ab21a1272179c5c3.tar.bz2
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Diffstat (limited to 'drivers/mmc/fsl_esdhc.c')
-rw-r--r--drivers/mmc/fsl_esdhc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 35f879e..e945c0a 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -327,9 +327,6 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
while (!(esdhc_read32(&regs->irqstat) & (IRQSTAT_CC | IRQSTAT_CTOE)))
;
- if (data && (data->flags & MMC_DATA_READ))
- check_and_invalidate_dcache_range(cmd, data);
-
irqstat = esdhc_read32(&regs->irqstat);
esdhc_write32(&regs->irqstat, irqstat);
@@ -400,9 +397,10 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if (irqstat & DATA_ERR)
return COMM_ERR;
- } while (!(irqstat & IRQSTAT_TC) &&
- (esdhc_read32(&regs->prsstat) & PRSSTAT_DLA));
+ } while ((irqstat & DATA_COMPLETE) != DATA_COMPLETE);
#endif
+ if (data->flags & MMC_DATA_READ)
+ check_and_invalidate_dcache_range(cmd, data);
}
esdhc_write32(&regs->irqstat, -1);