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>
diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index aae00e9..b495c75 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 @@
udelay(100);
if (wdog == 0)
- return COMM_ERR;
+ return -ECOMM;
return 0;
}
@@ -80,7 +81,7 @@
udelay(10);
if (wdog == 0)
- return COMM_ERR;
+ return -ECOMM;
return 0;
}
@@ -99,7 +100,7 @@
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 @@
*/
if (mmcstatus & MMCST0_CRCRS)
return 0;
- return COMM_ERR;
+ return -ECOMM;
}
udelay(10);
@@ -116,7 +117,7 @@
printf("Status %x Timeout ST0:%x ST1:%x\n", st_ready, mmcstatus,
get_val(®s->mmcst1));
- return COMM_ERR;
+ return -ECOMM;
}
/*