summaryrefslogtreecommitdiff
path: root/drivers/mmc/gen_atmel_mci.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/gen_atmel_mci.c
parent70f862808e8ae4b97fe736ec9d9d496881ad84b2 (diff)
downloadu-boot-fsl-qoriq-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/gen_atmel_mci.c')
-rw-r--r--drivers/mmc/gen_atmel_mci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
index 0474a15..69770df 100644
--- a/drivers/mmc/gen_atmel_mci.c
+++ b/drivers/mmc/gen_atmel_mci.c
@@ -213,7 +213,7 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if (!priv->initialized) {
puts ("MCI not initialized!\n");
- return COMM_ERR;
+ return -ECOMM;
}
/* Figure out the transfer arguments */
@@ -238,10 +238,10 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if ((status & error_flags) & MMCI_BIT(RTOE)) {
dump_cmd(cmdr, cmd->cmdarg, status, "Command Time Out");
- return TIMEOUT;
+ return -ETIMEDOUT;
} else if (status & error_flags) {
dump_cmd(cmdr, cmd->cmdarg, status, "Command Failed");
- return COMM_ERR;
+ return -ECOMM;
}
/* Copy the response to the response buffer */
@@ -303,7 +303,7 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if (status) {
dump_cmd(cmdr, cmd->cmdarg, status,
"Data Transfer Failed");
- return COMM_ERR;
+ return -ECOMM;
}
}
@@ -315,7 +315,7 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if (status & error_flags) {
dump_cmd(cmdr, cmd->cmdarg, status,
"DTIP Wait Failed");
- return COMM_ERR;
+ return -ECOMM;
}
i++;
} while ((status & MMCI_BIT(DTIP)) && i < 10000);