diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2016-07-19 07:33:36 (GMT) |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2016-08-05 02:21:25 (GMT) |
commit | 915ffa5213756568f6185d05cda2cb2f6050f974 (patch) | |
tree | 7f0d304eabe717a9c1c871cb346e6cdf18157a40 /drivers/mmc/sdhci.c | |
parent | 70f862808e8ae4b97fe736ec9d9d496881ad84b2 (diff) | |
download | u-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/sdhci.c')
-rw-r--r-- | drivers/mmc/sdhci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index d584b0b..1d6d2fd 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -170,7 +170,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, cmd_timeout); } else { puts("timeout.\n"); - return COMM_ERR; + return -ECOMM; } } time++; @@ -260,7 +260,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, } else { printf("%s: Timeout for status update!\n", __func__); - return TIMEOUT; + return -ETIMEDOUT; } } } while ((stat & mask) != mask); @@ -289,9 +289,9 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, sdhci_reset(host, SDHCI_RESET_CMD); sdhci_reset(host, SDHCI_RESET_DATA); if (stat & SDHCI_INT_TIMEOUT) - return TIMEOUT; + return -ETIMEDOUT; else - return COMM_ERR; + return -ECOMM; } static int sdhci_set_clock(struct mmc *mmc, unsigned int clock) |