summaryrefslogtreecommitdiff
path: root/drivers/mmc/dw_mmc.c
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2016-07-19 10:33:36 +0300
committerJaehoon Chung <jh80.chung@samsung.com>2016-08-05 05:21:25 +0300
commit915ffa5213756568f6185d05cda2cb2f6050f974 (patch)
tree7f0d304eabe717a9c1c871cb346e6cdf18157a40 /drivers/mmc/dw_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/dw_mmc.c')
-rw-r--r--drivers/mmc/dw_mmc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 3ca9743ba0..a6a5fc6579 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -158,7 +158,7 @@ static int dwmci_data_transfer(struct dwmci_host *host, struct mmc_data *data)
if (get_timer(start) > timeout) {
debug("%s: Timeout waiting for data!\n",
__func__);
- ret = TIMEOUT;
+ ret = -ETIMEDOUT;
break;
}
}
@@ -203,7 +203,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
while (dwmci_readl(host, DWMCI_STATUS) & DWMCI_BUSY) {
if (get_timer(start) > timeout) {
debug("%s: Timeout on data busy\n", __func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
}
@@ -269,7 +269,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
if (i == retry) {
debug("%s: Timeout.\n", __func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
if (mask & DWMCI_INTMSK_RTO) {
@@ -282,7 +282,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
* CMD8, please keep that in mind.
*/
debug("%s: Response Timeout.\n", __func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
} else if (mask & DWMCI_INTMSK_RE) {
debug("%s: Response Error.\n", __func__);
return -EIO;