summaryrefslogtreecommitdiff
path: root/drivers/mmc/mvebu_mmc.c
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2016-07-19 07:33:36 (GMT)
committerJaehoon Chung <jh80.chung@samsung.com>2016-08-05 02:21:25 (GMT)
commit915ffa5213756568f6185d05cda2cb2f6050f974 (patch)
tree7f0d304eabe717a9c1c871cb346e6cdf18157a40 /drivers/mmc/mvebu_mmc.c
parent70f862808e8ae4b97fe736ec9d9d496881ad84b2 (diff)
downloadu-boot-915ffa5213756568f6185d05cda2cb2f6050f974.tar.xz
mmc: use the generic error number
Use the generic error number instead of specific error number. If use the generic error number, it can debug more easier. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'drivers/mmc/mvebu_mmc.c')
-rw-r--r--drivers/mmc/mvebu_mmc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/mmc/mvebu_mmc.c b/drivers/mmc/mvebu_mmc.c
index 056aef5..a2792ac 100644
--- a/drivers/mmc/mvebu_mmc.c
+++ b/drivers/mmc/mvebu_mmc.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <errno.h>
#include <malloc.h>
#include <part.h>
#include <mmc.h>
@@ -172,15 +173,15 @@ static int mvebu_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
(SDIO_ERR_CMD_TIMEOUT | SDIO_ERR_DATA_TIMEOUT)) {
debug("%s: command READ timed out\n",
DRIVER_NAME);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
debug("%s: command READ error\n", DRIVER_NAME);
- return COMM_ERR;
+ return -ECOMM;
}
if ((get_timer(0) - start) > TIMEOUT_DELAY) {
debug("%s: command timed out\n", DRIVER_NAME);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
}
@@ -232,7 +233,7 @@ static int mvebu_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
if (mvebu_mmc_read(SDIO_ERR_INTR_STATUS) &
(SDIO_ERR_CMD_TIMEOUT | SDIO_ERR_DATA_TIMEOUT))
- return TIMEOUT;
+ return -ETIMEDOUT;
return 0;
}