diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2011-01-29 15:36:10 -0600 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-02-03 02:46:12 -0600 |
commit | 5103a03a0be2fd1a5270046d9f2bc77916e33a56 (patch) | |
tree | 969486ff9a138e255386e4767525027454235448 /drivers | |
parent | 6e7f0bc0ce33adbd028f4e34b7e9d3bf46e0f95b (diff) | |
download | u-boot-imx-5103a03a0be2fd1a5270046d9f2bc77916e33a56.zip u-boot-imx-5103a03a0be2fd1a5270046d9f2bc77916e33a56.tar.gz u-boot-imx-5103a03a0be2fd1a5270046d9f2bc77916e33a56.tar.bz2 |
fsl_esdhc: Add the workaround for erratum ESDHC-A001 (enable on P2020)
Data timeout counter (SYSCTL[DTOCV]) is not reliable for values of 4, 8,
and 12. Program one more than the desired value: 4 -> 5, 8 -> 9, 12 -> 13.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/fsl_esdhc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index d01c926..f3cccbe 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -219,6 +219,11 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data) if (timeout < 0) timeout = 0; +#ifdef CONFIG_SYS_FSL_ERRATUM_ESDHC_A001 + if ((timeout == 4) || (timeout == 8) || (timeout == 12)) + timeout++; +#endif + esdhc_clrsetbits32(®s->sysctl, SYSCTL_TIMEOUT_MASK, timeout << 16); return 0; |