summaryrefslogtreecommitdiff
path: root/drivers/mmc/davinci_mmc.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-08-05 09:15:55 -0400
committerTom Rini <trini@konsulko.com>2016-08-05 20:55:27 -0400
commita60d94b204412732409e70cb15236bd96d4da7d9 (patch)
tree4eb4d5b6b0783a6b244625109a724185c1b64a78 /drivers/mmc/davinci_mmc.c
parentd03a0308599bb658598848e86aadb0d140f65e0c (diff)
parent89f69e51734f5d704ef84503d24907bfde2f5577 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-mmc
Diffstat (limited to 'drivers/mmc/davinci_mmc.c')
-rw-r--r--drivers/mmc/davinci_mmc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index aae00e9dab..b495c7564c 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -9,6 +9,7 @@
#include <config.h>
#include <common.h>
#include <command.h>
+#include <errno.h>
#include <mmc.h>
#include <part.h>
#include <malloc.h>
@@ -66,7 +67,7 @@ dmmc_wait_fifo_status(volatile struct davinci_mmc_regs *regs, uint status)
udelay(100);
if (wdog == 0)
- return COMM_ERR;
+ return -ECOMM;
return 0;
}
@@ -80,7 +81,7 @@ static int dmmc_busy_wait(volatile struct davinci_mmc_regs *regs)
udelay(10);
if (wdog == 0)
- return COMM_ERR;
+ return -ECOMM;
return 0;
}
@@ -99,7 +100,7 @@ static int dmmc_check_status(volatile struct davinci_mmc_regs *regs,
return 0;
} else if (mmcstatus & st_error) {
if (mmcstatus & MMCST0_TOUTRS)
- return TIMEOUT;
+ return -ETIMEDOUT;
printf("[ ST0 ERROR %x]\n", mmcstatus);
/*
* Ignore CRC errors as some MMC cards fail to
@@ -107,7 +108,7 @@ static int dmmc_check_status(volatile struct davinci_mmc_regs *regs,
*/
if (mmcstatus & MMCST0_CRCRS)
return 0;
- return COMM_ERR;
+ return -ECOMM;
}
udelay(10);
@@ -116,7 +117,7 @@ static int dmmc_check_status(volatile struct davinci_mmc_regs *regs,
printf("Status %x Timeout ST0:%x ST1:%x\n", st_ready, mmcstatus,
get_val(&regs->mmcst1));
- return COMM_ERR;
+ return -ECOMM;
}
/*