diff options
author | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2010-07-31 04:45:18 +0000 |
---|---|---|
committer | Andy Fleming <afleming@freescale.com> | 2011-04-13 06:35:22 -0500 |
commit | 63fb5a7e4b0ada0bf77dd89120a61d2bd14e50af (patch) | |
tree | c26875c041c5d580872505778654a71d6f8b8e33 /drivers | |
parent | b97e0cd78837180e122cd9209b9e71e2c2d3f911 (diff) | |
download | u-boot-imx-63fb5a7e4b0ada0bf77dd89120a61d2bd14e50af.zip u-boot-imx-63fb5a7e4b0ada0bf77dd89120a61d2bd14e50af.tar.gz u-boot-imx-63fb5a7e4b0ada0bf77dd89120a61d2bd14e50af.tar.bz2 |
drivers/mmc/fsl_esdhc.c: reordered tests
As DATA_ERROR includes the value IRQSTAT_DTOE, a timeout error
would yield the first error return instead of TIMEOUT.
By swapping the test TIMEOUTs are reported as such
An alternate solution would be to remove the IRQSTAT_DTOE from the DATA_ERROR define
but as that one might be less desired I've opted for the simplest solution
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/fsl_esdhc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 4f1b515..2838795 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -332,11 +332,11 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) do { irqstat = esdhc_read32(®s->irqstat); - if (irqstat & DATA_ERR) - return COMM_ERR; - if (irqstat & IRQSTAT_DTOE) return TIMEOUT; + + if (irqstat & DATA_ERR) + return COMM_ERR; } while (!(irqstat & IRQSTAT_TC) && (esdhc_read32(®s->prsstat) & PRSSTAT_DLA)); #endif |