mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
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>
This commit is contained in:
parent
b97e0cd788
commit
63fb5a7e4b
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue