diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2016-07-19 16:33:36 +0900 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2016-08-05 11:21:25 +0900 |
commit | 915ffa5213756568f6185d05cda2cb2f6050f974 (patch) | |
tree | 7f0d304eabe717a9c1c871cb346e6cdf18157a40 /drivers/mmc/gen_atmel_mci.c | |
parent | 70f862808e8ae4b97fe736ec9d9d496881ad84b2 (diff) | |
download | u-boot-915ffa5213756568f6185d05cda2cb2f6050f974.tar.gz |
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c index 0474a15484..69770df44d 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); |